-
-
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
introduce group scatter attributes #6381
Conversation
@archmoj, I know we talked about group legend items that would avoid this, but I wonder if the scatter group going back to the centre when you click it on the legend is the right behaviour here and why it would differ to the behaviour for bar. |
@LiamConnors now with the implementation of the |
@archmoj this looks great! There's one piece I don't understand: if I load If I also clear So I guess the odd case is when There's a related case that's clearly broken: in the same mock, if I just clear Plotly.restyle(gd, 'offsetgroup', null, 11) // clear the group for the last trace, this is OK Plotly.restyle(gd, 'offsetgroup', '3', 11) // put it in a new group
Plotly.restyle(gd, 'offsetgroup', null, 11) // clear its group I don't think this is unique to scatter, I can get a similar history-dependent errors from bars from setting / clearing the |
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.
💃 Actually, since the bug I identified - when there are some traces with offsetgroup
and others without it - was already there with bars, I guess it's fine if we merge as is, and just make an issue to come back to this behavior later. Great work!
…gnmentgroup, offsetgroup, scattermode and scattergap (plotly/plotly.js#6381)
In case anyone stumbles upon this change and wonders why it doesn't work for them in a horizontal barchart: Make sure your scatter traces also have |
Thanks for the feedback @Braintelligence - just to clarify, is the following demonstrating the type of behaviour you are talking about? I'll add an example to the docs to clarify using with
|
Resolves #4913.
@plotly/plotly_js