Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up[BUG] Can't create custom callback on legend click #5104
Comments
@giovanniciriello can you build a fiddle that reproduces that issue? |
@giovanniciriello I think you are using a Chart.defaults.global.legend.onClick = onClickCallback;
Chart.defaults.doughnut.legend.onClick = onClickCallback;
Chart.defaults.polarArea.legend.onClick = onClickCallback; |
@jcopperfield I'm using a doughnut chart, so the second line worked for me! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected Behavior
I wish to set a callback function on legend click that hide/show the dataset (currently the default action) and that do something more.
Current Behavior
I've tried same codes e.g:
but this code does't override the callback.
Environment