Bar Chart

Hi everyone,

I am creating a bar chart with streamlit with x-axis [Jan, Feb, March].
However, the x-axis is sorted automatically when the graph is plotted.[Feb, Jan, March]
May I know if there any way to unsort?

Thanks a lot!

Howdy, @gegreg!

If you’re using plotly, dealing with categoryorder might be a way. For that, you’ll need to call a method to update the layout as follows:

fig.update_layout(xaxis={'categoryorder':'total descending'})

PS.: You can switch between total ascending and total descending