altair grouped bar chart with quantitive axis
When using a quantitive x axis the xOffset does not seem to work in altair, i.e. the bars are stacked but I would like to have them next to each other. When encoding the x-axis as ordinal x=alt.X("Genre:O")
it works, but the sorting is wrong. Any idea how to solve this?
Interactive proportional value of a pandas column displayed using altair pie chart in python?
I have a sample dataframe created using the snippet below
Remove gap between two graphs with shared axis
Objective I want to generate a ‘double ended’ barchart, showing gained points (of some metric) vis-a-vis missed points, something like this: Result so far I managed to do this import altair as alt import pandas as pd source = pd.DataFrame( { “cohort”: [“A”, “B”, “C”, “D”, “E”, “F”, “G”, “H”, “I”], “gained”: [28, 55, 43, […]
Altair chart empty by dropdown when other chart is displayed
I want to have two different charts, where in the first I can choose an artist in a legend and in the second chart I want to have a dropdown, that filters a year. In my database I have artists, sales and years (for published albums). The charts work fine by itself, but if I want to show both with a vertical concatination I get a problem. The first chart works as expected but the second graph is completly empty on selecting a year.
Linking Geospatial data to a bar chart
I am attemtping to link two graphs together, a geospatial graph of Philladelphia outlining its districts along with a bar chart that shows the amount of complaints against police per district. This is done using Altair and Python.
Use value of alt.selection_point as sort field
I have the following facet chart where the order of the facet panels is determined by the column foo
. I would like to add a drop-down box where I can select to dynamically update the sort order of the facet panels to be based on either the column foo
or the column bar
(see attempt below).
Altair facet chart header position and orientation configuration
I have a dataframe(‘datamining2’) like this.
Altair Graph in Notebook
When I tried to draw the graph of USGS earthquakes using Altair, it always gives me blank graph. Here are my codes