-
-
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
Allow clickable legend group titles when group has no pie-like traces #5771
Conversation
The title-clicking is fine, but actually if you look at this pen https://codepen.io/nicolaskruchten/pen/LYyPvMq you'll see that when you have a mixture of pies and scatters we already have some weird bug where the pie disappears and leaves a black square. My vote would be to have clicking on a title behave exactly like clicking on a non-pie legend item, including when pies are present, and then to log a bug for the weird black-square behaviour and solve it all at once. Let's not introduce new behaviour for the title, let's just follow the current (buggy) pattern. |
(note: the black-square behaviour exists in 2.1.0 also, so it's not new here) |
So you suggest that when a legend group has a title,
|
No, I'm saying that clicking on the title should have the same effect as clicking on a non-pie trace marker. |
Since the |
@rithwikjc yes, your enthusiasm for this feature is noted :) That specific behaviour change request is tracked in this issue #3135 and once implemented it will not be on by default, rather it will be opt-in with a specific attribute in |
Thank you so much @nicolaskruchten. I am a student and hence by no means capable of sponsoring anything. But I do program, but am yet to venture deep into JS. And once I am capable I hope to contribute to this and other open source projects. |
I agree this behaviour is bad but I'm very skeptical that anyone is using pies and legend groups in the wild. |
Then can we just disable clicking the group title when there are any pies in the plot? |
That was the original implementation in this PR... I can live with it. |
This reverts commit 4c4a11b.
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.
💃 Thanks @archmoj, looks great. And @nicolaskruchten my apologies for not digging into this earlier, could have saved some of this whiplash.
Resolves #5765.
@plotly/plotly_js