I am attempting to sort a normalized stacked bar chart based on a specific order.
I would like stacked bars sorted by this order:
Order = dict({'Paid work':1,'Education':2,'Sleep':3,'Other unpaid work':4,'Housework & Shopping':5,'Personal care':6, 'Eating and drinking':7,'TV and Radio':8,'Seeing friends':9,'Other leisures':10})
and Country (Y axis) should be also sorted by the length of "Paid work" bars.
But I've got is this order with "TV & Radio" on the left end side of the chart and cant see in which country people spend time on "paid work" most.
My attempt:

Wrong code:
alt.Chart(df).mark_bar(size=15).encode(
alt.Y('Country:O'),
alt.X('Time:Q', stack='normalize',sort=alt.EncodingSortField(field='Order',order='descending')),
alt.Color('Category:N',sort=alt.EncodingSortField(field='Order')),
tooltip=['Country', 'Category', 'Time']
).properties(
width=600,
height=600, title = {'text' :'How do people spend their time?',
'subtitle' : 'Average of minutes per day from time-use diaries for people between 15 and 64'})
I'm new to this platform, please take a look at the data and my simple code in this notebook: https://www.kaggle.com/hoangyennhi/exercise-dv


