I’m developing an application in which I need to get the ‘x, y’ coordinates of the mouse when the user clicks the screen. By ‘x, y’ coordinates I don’t mean mousedown.clientX and mousedown.clientY, I need to know the data coordinates (or an approximation of it) of the point in which the users clicked in the graph (on the graph’s scale) and this points is not necessarily part the
data array (so using
myDiv.on('plotly_click', callback(data)) doesn’t help me too much either). For example:
Is there any way to map between pixel coordinates and data coordinates?