You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A new attribute in all traces called legendrank which defaults to the index of the trace in the data array. The legend items will then be sorted by legendrank (ties broken by index in the data array) before being laid out.
For future searchers: I couldn't get legendrank to work; turns out I was inadvertently using plotly.js 1.x. This feature landed somewhere in the 2.x line.
For future searchers: I couldn't get legendrank to work; turns out I was inadvertently using plotly.js 1.x. This feature landed somewhere in the 2.x line.
A new attribute in all traces called
legendrank
which defaults to the index of the trace in thedata
array. The legend items will then be sorted bylegendrank
(ties broken by index in thedata
array) before being laid out.As an example for:
then I would expect the legend order to be:
G1(B,C), A, G2(D,E)
.Note that the group order matters in the example above, when this will be coupled with #5260 and/or
legendgroupgap
.The text was updated successfully, but these errors were encountered: