Skip to content

Default legend pie onClilck method type mismatch #11666

Open
@frenzymind

Description

@frenzymind

Expected behavior

Call method without type issue

Current behavior

LegendElement<keyof ChartTypeRegistry> is not assignable to parameter of type LegendElement<"pie">

Reproducible sample

codesandbox

Optional extra steps/info to reproduce

No response

Possible solution

I have to use type assertion: legend as LegendElement<'pie'>

Context

No response

chart.js version

chart.js v4.4.1 and types v2.9.41

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