Hi all,
Hopefully this is an easy one. I\'ve set up a legend with an onclick event but would like the mouse cursor to change to \"pointer\" when I hover ove
The accepted answer did not work for me because my tooltips are always visible (position: "nearest"
). So I use a timeout to change and revert the cursor style:
onHover: function(event, legendItem) {
document.getElementById("canvas").style.cursor = "pointer";
clearTimeout(hoverTimeout); // global var
hoverTimeout = setTimeout(function() {
document.getElementById("canvas").style.cursor = "default";
}, 100);
}
It's a dirty trick but it works.