I’m having problems with ordering the lengends for pie chart.
I’ve thought the order is based on how it is labeled (A, B, C, D and so on in my case.)
However, it seems like it is decided by the size of its ratio in pie chart.
In short, I want to have my right-hand side legend to have [A, B, C, D, E, F] order …
Is there any way I can configure this ?
Here is my actual pie chart and the codes are below
Ah dang, this is a little frustrating when using Plotly express with a color faceting to produce different traces. I have a sequence of years in my legend that are not sorted, and I can’t sort them using trace_orders as that reorders the actual traces, breaking the sorting of my the already sorted x-axis values.
Looking at the link click through counts in this thread and this other related thread on this issue, this could be a friction point for a few people: Customizing the order of Legends