-
Notifications
You must be signed in to change notification settings - Fork 11.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
Use global element hidden status for Pie charts #7156
Conversation
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.
Is it a good idea to store something on the chart for this?
Seemed like a good holder, but maybe not. I pushed an alternative solution to review. |
What's expected when you update the chart? Should it clear the hidden elements? E.g. you have a completely new dataset, I'm guessing you might not want to hide based on index of the previously clicked dataset |
As in the linked issue, when you hide an item and then add another dataset, the legend shows that the item is hidden, but its only hidden from the old dataset(s). When you click the legend again, the old datasets show that index and the new dataset hides that index. I don't think anyone expects that kind of behavior. So this pr: the new dataset's item is also hidden = in sync with the legend. This does not work with custom legend implementation though, because there is no api. |
d177b53
to
6bd0da6
Compare
It looks like |
I went ahead and removed the |
I'm very happy to have Can we move Also, I wonder if there's a way we can share the |
It would actually work for others too, it does not care what indices are used. So could as well be datasetIndex. Could remove the hidden from dataset too. How does that sound? |
Ok. I guess that would be fine |
I'm not going to do that though. |
Fixes: #6746