Black Lives Matter. Please consider donating to Black Girls Code today.

How to display legends in order ? ( Pie Chart )


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

Thanks in advance!!

                  "data": [
                      "values": by_sns_platform_1,
                      "labels": ['A', 'B', 'C', 'D', 'E', 'F'],
                      "domain": {"x": [0, .48]},
                      "name": "Published",
                      "hole": .3,
                      "type": "pie",
                      "marker" : {"colors":color_palette_1}

It looks like the only control that is available right now is the layout.legend.traceorder attribute: