-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add options to include shapes and newshape
in legends
#6653
Conversation
src/components/shapes/attributes.js
Outdated
'with *reversed* `legend.traceorder` they are on bottom/right side.', | ||
'The default legendrank is 1000,', | ||
'so that you can use ranks less than 1000 to place certain items before all unranked items,', | ||
'and ranks greater than 1000 to go after all unranked items.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we say something about unranked or equal rank items? I presume traces according to their order in data
, then shapes according to their order in layout.shapes
?
Also I don't see shapes[].legendrank
used in a test image to intersperse shapes and traces, or shapes[].legend
to put shapes on multiple legends, can we add those?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@archmoj, trying this out with Plotly.py, if i set And if I click on a shape, it only toggles the three traces, not the other shape
Also, the shapes always appear after the traces in the legend, even if I define them first. How is the |
@LiamConnors Thanks for your feedback. Regarding your question about shapes being presented at the end of traces, if one wants shapes to be displayed first, they could e.g. set Thank you! |
Thanks @archmoj! That update to the description makes sense and I'll add an example to the docs that shows this. I still encounter the issue when |
Co-authored-by: Liam Connors <liam@plot.ly>
I notice a bug that seems to be new in this PR: if you have multiple legends, with or without shapes, you can double-click a trace or shape to isolate it, but if you double-click the same trace or shape again it doesn't bring the others back. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You fixed my last comment in #6684 so this is good to go after the conflict is resolved! Nice work! 💃
Resolves #98 ! 😎
@plotly/plotly_js
@chriddyp