I have the following chart -

I'd like to be able to sort the columns (NOT the individual bars of a single group - I know how to do that already), i.e order the 3 sub-chart - if you will - based on the value of any category(a,b or c) I choose.
I tried using alt.SortField and alt.EncodeSortField, they move around the charts a bit, but don't actually work if you change the category to see if they actually work.
Code -
import altair as alt
import pandas as pd
dummy = pd.DataFrame({'place':['Asia', 'Antarctica','Africa', 'Antarctica', 'Asia', 'Africa', 'Africa','Antarctica', 'Asia'],'category':['a','a','a','b','b','b','c','c','c'],'value':[5,2,3,4,3,5,6,9,5]})
alt.Chart(dummy).mark_bar().encode(
x=alt.X('category'),
y='value',
column=alt.Column('place:N', sort=alt.SortField(field='value', order='descending')),
color='category',
)
I know that alt.Column('place:N', sort=alt.SortField(field='value', order='descending')), doesn't seem correct, since I am not targeting any category, so I tried x=alt.X('category', sort=alt.SortField(field='c', order='descending')), too, but it doesn't work either.
Expected Output (assuming descending order)-
- If I want to order by 'c', then middle column should be first, followed by left and finally right column.
- It already seems ordered by 'b'.
- If I want to order by 'a', then right column should be first, followed by left and finally middle column.

