Skip to content

Events can't be used with Legend plugin #11538

Open
@elinake

Description

@elinake

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions