2๐
โ
You will be able to get the active point with getElementAtEvent
method.
So the code will be
var helpers = Chart.helpers;
helpers.bindEvents(mainDashboardChart, ["mousemove", "touchstart", "touchmove", "mouseout"], function(evt){
var activeElement = mainDashboardChart.getElementAtEvent(evt);
$('#main').css('cursor',activeElement.length ? 'not-allowed' : 'default'); });
0๐
You can play with the hover
option like this :
hover: {
onHover: function(e) {
$("#myChart").css("cursor", e[0] ? "pointer" : "default");
}
}
Working example on a doughnut chart: https://jsfiddle.net/Tintin37/s9m6mggL/1/
Source:stackexchange.com