Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Plotly js click detection

I am writing an application using plotlyjs. The click handler works fine for when a user clicks on a point. However, I need the ability to detect clicks on arbitrary locations on the plot (i.e. close to but not exactly on a point). Doing this currently does not seem to fire a click event. Is there a way to do this?

If it makes any difference. I am using an angularjs plugin for plotlyjs.

Thanks

There’s no easy way to do this unfortunately.

But, here are a few possible solutions:

1 Like