{"action":"closed","issue":{"url":"https://api.github.com/repos/altair-viz/altair/issues/1024","repository_url":"https://api.github.com/repos/altair-viz/altair","labels_url":"https://api.github.com/repos/altair-viz/altair/issues/1024/labels{/name}","comments_url":"https://api.github.com/repos/altair-viz/altair/issues/1024/comments","events_url":"https://api.github.com/repos/altair-viz/altair/issues/1024/events","html_url":"https://github.com/altair-viz/altair/issues/1024","id":341621925,"node_id":"MDU6SXNzdWUzNDE2MjE5MjU=","number":1024,"title":"How to avoid Javascript Error in altair viewing?","user":{"login":"reichaves","id":23701514,"node_id":"MDQ6VXNlcjIzNzAxNTE0","avatar_url":"https://avatars3.githubusercontent.com/u/23701514?v=4","gravatar_id":"","url":"https://api.github.com/users/reichaves","html_url":"https://github.com/reichaves","followers_url":"https://api.github.com/users/reichaves/followers","following_url":"https://api.github.com/users/reichaves/following{/other_user}","gists_url":"https://api.github.com/users/reichaves/gists{/gist_id}","starred_url":"https://api.github.com/users/reichaves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reichaves/subscriptions","organizations_url":"https://api.github.com/users/reichaves/orgs","repos_url":"https://api.github.com/users/reichaves/repos","events_url":"https://api.github.com/users/reichaves/events{/privacy}","received_events_url":"https://api.github.com/users/reichaves/received_events","type":"User","site_admin":false},"labels":[{"id":262356191,"node_id":"MDU6TGFiZWwyNjIzNTYxOTE=","url":"https://api.github.com/repos/altair-viz/altair/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-07-16T18:14:34Z","updated_at":"2018-07-20T14:22:35Z","closed_at":"2018-07-20T14:22:35Z","author_association":"NONE","body":"Hi. In python3 I have a dataframe on pandas:\r\n\r\nimport pandas as pd\r\nimport altair as alt\r\n\r\nnomes_dep.info()\r\n<class 'pandas.core.frame.DataFrame'>\r\nRangeIndex: 120 entries, 0 to 119\r\nData columns (total 3 columns):\r\nDeputado       120 non-null object\r\nValor          120 non-null object\r\nporcentagem    120 non-null float64\r\ndtypes: float64(1), object(2)\r\nmemory usage: 2.9+ KB\r\n\r\n    Deputado                Valor                                   porcentagem\r\n0   ITAMAR BORGES           1,225,322.51             1.60\r\n1   CARLAO PIGNATARI        1,205,708.42            1.57\r\n2   CAMPOS MACHADO          1,155,406.50          1.51\r\n3   ALENCAR SANTANA BRAGA   1,149,436.08    1.50\r\n4   FELICIANO FILHO         1,134,941.68               1.48\r\n\r\nColumn \"Deputado\" has names of people. And column \"porcentagem\" has the percentage that these people had of expenses in relation to the total of an institution\r\n\r\nWith altair I tried to make a horizontal bar chart, in the X axis the values of the column \"porcentagem\" and in the Y axis the names of column \"Deputado\":\r\n\r\n```python\r\nalt.Chart(nomes_dep.reset_index().head(10), title=\"Deputados com maiores totais de despesas em %\").mark_bar().encode(\r\n    x=alt.X(\"porcentagem:Q\", axis=alt.Axis(title=\"Porcentagem\", format=\"%s\")),\r\n    y=alt.Y(\r\n        \"Deputado:N\",\r\n        sort=alt.SortField(field=\"Porcentagem\", op=\"sum\", order=\"descending\"),\r\n        axis=alt.Axis(title=\"Deputados\")\r\n    )\r\n)\r\n```\r\n\r\nBut in jupyter lab I had this message:\r\n\r\nJavascript Error: t is undefined. This usually means there's a typo in your chart specification. See the JavaScript console for the full traceback.\r\n\r\nPlease, does anyone know how I can avoid this error?\r\n"}}
{"actor":{"display_login":"jakevdp"}}