Hi,
I would like to know how can I set the order of the bars in a horizontal bar chart as the reverse order of the labels. For example, if:
labels = ['label1', 'label2', 'label3']
values = [15, 10, 25]
I tried to specify in the yaxis dict in layout like this:
yaxis = {'categoryorder': 'array', 'categoryarray': labels[::-1]}
So the first bar from top to bottom is the one that refers to the ‘label1’ and so it goes. But that doesn’t work as I expected, instead it seems to always use ‘categorryorder’ as ‘trace’.