I made a graph using canvas and would like to have a tooltip on a hover event over some of the plotted data. As far as i know canvas acts like a img tag and you can't really embed any html in a canvas element. Is it possible to create a tooltip that pops up when you hover over a specific coordinate, without any predefined HTML elements like a div or something?
My example:
window.addEventListener('mousemove', function(e){
if(e.offsetX > set_x_cor && e.offsetY > set_y_cor){
///do code here//
}
});
This event listener would be built up when all the graphs are drawn in canvas and is where the set coordinates will be set.