Mouse click position anywhere on plot canvas

Is it possible to get the (x,y) coordinates of a mouse click anywhere on the canvas? clickData, hoverData events work only on data points. I need to simulate a click on a rectangular shape so that it gets highlighted.

There was no solution for Dash in a similar thread Get mouse's position on click

Thanks in advance!

1 Like