Sorting by number

Hello,
I have a Bar Chart with 2 traces, it shows number value for every hour. On 1 trace it show data which have status 1 on the other status 2. For example in trace 1: x:[1,2,3,4], y[100,200,300,100] and in trace 2: [5,6,7], y[200,300,600] and when i put both on them it don’t sort by their x value, so i have a chart with x[5,6,7,1,2,3,4], y[200,300,600,100,200,300,100]. Is there any solution to set sorting option?

That shouldn’t happen for linear axes. Are you setting xaxis.type: 'category' by any chance?

I had set type to category. Just changed it and work perfect.
Thank you :slight_smile:

1 Like
three reasons why you should buy plotly pro: support open source, get great support, host your plots and dashboards online