chartjs / chartjs/chartjs-plugin-datalabels

Wrong dataIndex returned from click listener

Open
#324 2 comments 0 reactions 0 assignees View on GitHub
needs test case
Dominant language
JavaScript
Stars
920
Forks
507
PR merge metrics
No merged PRs in 30d

Description

The `click` listener regularly (but not always) returns the wrong value for the `ctx.dataIndex` when being used with a radar diagram. Sometimes it will return 0 when a different data point has been clicked on.

I have managed to fix this bug for my application by using the `enter` listener to get the `dataIndex`, which consistently returns the correct dataIndex.

I'm using v2.0.0 with chart.js 3.6.0 and vue 2.6.14.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.