14π
β
The property is actually stored in tooltips
like this :
options: {
tooltips: {
// Overrides the global setting
mode: 'label'
}
}
Check your updated fiddle to see it working, and here is its result :
3π
For Chart.js 3, label
mode is replaced by index
and tooltips
should be placed as tooltip
in plugin object.
Below is working for chartjs 3.
plugins: {
tooltip: {
mode: 'index',
position: 'average',
}
}
2π
For Chart.js 3.7.1 this is what worked for me
options: {
interaction: {
mode: 'index'
}
}
Documented under ChartJs Interactions Documentation
Source:stackexchange.com