Sorting Stacked bar charts

Hello all,
Is it possible to sort the values of a stacked bar chart?

In the example below, the data source is a dataframe with Product ID, Sales value and Country as columns. I have a stacked bar chart displaying some product IDs on the x-axis, sales value on the y-axis, categorised (stacked) by country. How to sort on the stacked y values?

yes! this was released 10 days ago in plotly.js (1.48.0 - in Dash doesn’t have this plotly.js version yet, but we will soon. Keep an eye on the ( for updates.


May I know how to implement this sorting of stacked bar charts? I’m struggling with it as well…