I have a line chart and I set up my tooltip like this
options: {
tooltips:{
mode: 'x',
intersect: false,
callbacks: {
footer: function(tooltipItem, data) {
return 'some text'
}
}
},
}
It works fine. The problem I have is that when I move my cursor to the x-axis ticks, which are outside the main plot/canvas, the tooltips stills appear. I've tried to set intersect: true
but then the tooltip only shows up when I hover directly over the points. Ideally I want the tooltips to appear whenever I hover over the vertical gridlines (happens when intersect:false
), but to not appear when my cursor moves outside of the main canvas. Is it possible?