Multiple legends: trace.legend and layout.legend<N>
See original GitHub issueBreaking off of https://github.com/plotly/plotly.js/issues/1668 …
Multiple users have requested what amounts to the ability to have multiple legends, within the current concept of “each trace has a single legend item which appears in a single legend”. This could be implemented by adding a legend
attribute to each trace that would operate similarly to the xaxis
attribute, and a corresponding legend2
, legend3
series of attributes in the layout
. This is distinct from the idea of having a legend for size and one for symbol etc, as in that case each item would refer to multiple traces, and each trace would be represented by multiple items.
The major challenge here is the default positioning of legend2
if present… we could do something really ugly like just having it default to the position of the first legend and forcing users to position them manually, but having it “stick to the bottom” is probably a much more graceful solution, if more complex to implement.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:25
- Comments:6 (4 by maintainers)
Top GitHub Comments
We’re still looking for a sponsor, and will update this issue when we find one 😃
This issue has been tagged with
NEEDS SPON$OR
A community PR for this feature would certainly be welcome, but our experience is deeper features like this are difficult to complete without the Plotly maintainers leading the effort.
Sponsorship range: $10k-$15k
What Sponsorship includes:
Please include the link to this issue when contacting us to discuss.