mirror of
https://github.com/chartjs/Chart.js.git
synced 2026-03-04 23:44:05 +01:00
Update documentation for getElementsAtEventFor Mode (#8803)
The correct properties are `datasetIndex` and `index` without an '_' prefix
This commit is contained in:
committed by
Jukka Kurkela
parent
3257be9e43
commit
01d5f237fc
@@ -107,8 +107,8 @@ function clickHandler(evt) {
|
||||
|
||||
if (points.length) {
|
||||
const firstPoint = points[0];
|
||||
var label = myChart.data.labels[firstPoint._index];
|
||||
var value = myChart.data.datasets[firstPoint._datasetIndex].data[firstPoint._index];
|
||||
var label = myChart.data.labels[firstPoint.index];
|
||||
var value = myChart.data.datasets[firstPoint.datasetIndex].data[firstPoint.index];
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user