Here is my code for the dataframe
df = pd.DataFrame({'var_1':['a', 'a', 'a', 'b', 'b', 'b', 'c', 'c', 'c'],
'var_2':['m', 'n', 'o', 'm', 'n', 'o', 'm', 'n', 'o'],
'var_3':[np.random.randint(25, 33) for _ in range(9)]})
Here is the dataframe that I have
var_1 var_2 var_3
0 a m 27
1 a n 28
2 a o 28
3 b m 31
4 b n 30
5 b o 25
6 c m 27
7 c n 32
8 c o 27
Here is the code I used to get the stacked bar plot
fig = px.bar(df, x='var_3', y='var_1', color='var_2', orientation='h', text='var_3')
fig.update_traces(textposition='inside', insidetextanchor='middle')
fig
But I want the bar to stack in descending order of the values, largest at the start/bottom and smallest at top
How should I update the layout to get that

