Currently, a pie trace can have one legendrank only that will order the legend entries of its slices compared to the legend entries of other traces.
It's not possible to order the legend entries of the slices among each other. They seem to have a fixed order based on their values. E.g. in this example the legend entry for C will appear first because it is the largest slice.
{
"data": [
{
"type": "pie",
"values": [1, 2, 10, 4, 5],
"labels": ["E", "D", "C", "B", "A"]
}
],
"layout": {
"width": 500,
"height": 400,
"legend": {
"title": {
"text": "A legend"
}
}
}
}
Sometimes however, it might be desirable, to order the slices in the legend differently, because e.g. some slices should be grouped semantically or because a certain slice should be highlighted. This is currently not possible.
Currently, a pie trace can have one legendrank only that will order the legend entries of its slices compared to the legend entries of other traces.
It's not possible to order the legend entries of the slices among each other. They seem to have a fixed order based on their values. E.g. in this example the legend entry for C will appear first because it is the largest slice.
Sometimes however, it might be desirable, to order the slices in the legend differently, because e.g. some slices should be grouped semantically or because a certain slice should be highlighted. This is currently not possible.