You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to change the second chart circumference when i click the legend (click toggles dataset visibility), but the problem is, that its toggle visibility of the second dataset by index as well.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
What trying to do:
i have a doughnut chart with two datasets and three items in data [a, b, c.
The first one is 360 circumference, the second one is the b value circumference.
Work example: https://codesandbox.io/embed/peaceful-moon-0gofdj?fontsize=14&hidenavigation=1&theme=dark
I want to change the second chart circumference when i click the legend (click toggles dataset visibility), but the problem is, that its toggle visibility of the second dataset by index as well.
The docs refers to a wrong code https://www.chartjs.org/docs/latest/configuration/legend.html
but i found correct way in the controller.doughnut.js https://github.com/chartjs/Chart.js/tree/master/src/controllers
also i can hide some datasets like this, but it doesn't cross out the legend
can anybody help me?
Beta Was this translation helpful? Give feedback.
All reactions