Chart.js
Chart.js copied to clipboard
Events can't be used with Legend plugin
Expected behavior
This closed issue describes how not having events property in legend breaks onclick - mousedown behavior. The fix was implemented for Plugin, but Legend does not implement Plugin, so Legend still has a bug.
Current behavior
What happens now in the example, is that legend's onClick is run twice, therefore disabling and enabling the signal immediately. In the code it looks like mouseup and onClick are treated as the same event.
Reproducible sample
https://stackblitz.com/edit/angular-chart-js-xkhcjv?file=src%2Fapp%2Fapp.component.ts
Optional extra steps/info to reproduce
No response
Possible solution
No response
Context
No response
chart.js version
4.4.0
Browser name and version
No response
Link to your project
No response