-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Description
I would like to have legends grouped by a few criteria, ex: age, and gender.
Now it's possible to add a subgroups legend only by adding fake traces:
(comes from some plotly documentation)
fig.add_trace(go.Scatter(y=[None], mode='markers',
marker=dict(symbol='circle', color='black'),
name='Female',
))
Only the gap that grouping is not working when legend is clicked from the frontend.
It would be possible to make it happened if the legendgroup property for each trace will accept an array.
In this case, it will be possible to still keep it clickable and resolve traces visibility.
Some related topics:
https://plotly.com/python/reference/#scatter-legendgroup
https://community.plotly.com/t/possible-to-have-nested-or-hierarchical-legends/2376/3
https://community.plotly.com/t/plotly-express-how-to-separate-symbol-and-color-in-legend/38950
mehmetbercan, dmitmatveev and timslittle
Metadata
Metadata
Assignees
Labels
No labels