Skip to content

[FEATURE]: Enable legend rank per pie slice #7778

Description

@my-tien

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"
}
}
}
}
Image

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions