Chart.js icon indicating copy to clipboard operation
Chart.js copied to clipboard

Events can't be used with Legend plugin

Open elinake opened this issue 1 year ago • 0 comments

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

elinake avatar Oct 11 '23 07:10 elinake