{"action":"created","issue":{"url":"https://api.github.com/repos/altair-viz/altair/issues/1044","repository_url":"https://api.github.com/repos/altair-viz/altair","labels_url":"https://api.github.com/repos/altair-viz/altair/issues/1044/labels{/name}","comments_url":"https://api.github.com/repos/altair-viz/altair/issues/1044/comments","events_url":"https://api.github.com/repos/altair-viz/altair/issues/1044/events","html_url":"https://github.com/altair-viz/altair/issues/1044","id":344602294,"node_id":"MDU6SXNzdWUzNDQ2MDIyOTQ=","number":1044,"title":"How do you limit the number of columns displayed?","user":{"login":"adiep2501","id":9092074,"node_id":"MDQ6VXNlcjkwOTIwNzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/9092074?v=4","gravatar_id":"","url":"https://api.github.com/users/adiep2501","html_url":"https://github.com/adiep2501","followers_url":"https://api.github.com/users/adiep2501/followers","following_url":"https://api.github.com/users/adiep2501/following{/other_user}","gists_url":"https://api.github.com/users/adiep2501/gists{/gist_id}","starred_url":"https://api.github.com/users/adiep2501/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adiep2501/subscriptions","organizations_url":"https://api.github.com/users/adiep2501/orgs","repos_url":"https://api.github.com/users/adiep2501/repos","events_url":"https://api.github.com/users/adiep2501/events{/privacy}","received_events_url":"https://api.github.com/users/adiep2501/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-25T20:50:56Z","updated_at":"2018-07-25T22:02:47Z","closed_at":null,"author_association":"NONE","body":"I have a dataset that is heavily skewed to the left. So there are a few columns that are largest and the rest being much smaller. I have around ~500 columns to graph and I can't figure out how to limit them within altair.\r\n\r\nI do have a working solution with pandas but it's specific to my use case:\r\n```\r\nalt.Chart(df.nlargest(50, 'count)).mark_bar().encode(\r\n     ...\r\n)\r\n```\r\nThis doesn't work well with interactive graphs. For example, if you wanted to see columns with smaller counts, it wouldn't work since it's not there in the first place.\r\n\r\nI ultimately want some sort of way to interactive adjust the number of columns you see. Maybe I am looking in the wrong places, but I don't see examples that do that."},"comment":{"url":"https://api.github.com/repos/altair-viz/altair/issues/comments/407911236","html_url":"https://github.com/altair-viz/altair/issues/1044#issuecomment-407911236","issue_url":"https://api.github.com/repos/altair-viz/altair/issues/1044","id":407911236,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzkxMTIzNg==","user":{"login":"adiep2501","id":9092074,"node_id":"MDQ6VXNlcjkwOTIwNzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/9092074?v=4","gravatar_id":"","url":"https://api.github.com/users/adiep2501","html_url":"https://github.com/adiep2501","followers_url":"https://api.github.com/users/adiep2501/followers","following_url":"https://api.github.com/users/adiep2501/following{/other_user}","gists_url":"https://api.github.com/users/adiep2501/gists{/gist_id}","starred_url":"https://api.github.com/users/adiep2501/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adiep2501/subscriptions","organizations_url":"https://api.github.com/users/adiep2501/orgs","repos_url":"https://api.github.com/users/adiep2501/repos","events_url":"https://api.github.com/users/adiep2501/events{/privacy}","received_events_url":"https://api.github.com/users/adiep2501/received_events","type":"User","site_admin":false},"created_at":"2018-07-25T22:02:47Z","updated_at":"2018-07-25T22:02:47Z","author_association":"NONE","body":"I should have been more clear, sorry about that. I wanted something like a button where you click on the legend and it only shows the columns you are interested in.\r\n\r\nFor example, lets say we have fruits, stores, and how much every store sold. We could have a graph of all of the stores and their sales, then color the fruits so it's a stacked bar. Some stores don't sell certain fruits, so they could be one color.\r\n\r\nI trying to make a graph where if you select a fruit (legend), it only shows the stores that sold at least one of that fruit. That way you don't have to clip the dataset and can see all of it."}}
{"actor":{"display_login":"adiep2501"}}