Closed batata004 closed 8 months ago
If you want your onHover function to only work for 1 dataset you need to write it like this:
onHover:function(evt,activeEls,chart){
if (activeEls.datasetIndex !== 1) {
return;
}
// Your actual code
},
Closing as this is not a bug, just a wrong implementation
Expected behavior
It should disable
Current behavior
It is not being disabled
Reproducible sample
onhover return is not being honored
Optional extra steps/info to reproduce
No response
Possible solution
No response
Context
The code below should disable the
hover
effect for all the datasets except 1. However it has no effect.chart.js version
latest
Browser name and version
chrome latest
Link to your project
No response