Black Lives Matter. Please consider donating to Black Girls Code today.

On mouse down event

Is there a way to detect when the user click down on a Plotly chart? We are updating the plot continuously and we would like to stop/skip updates if the user starts to zoom/move the plot. Right now we still attempt to update the plot and we see ‘Uncaught (in promise) undefined’ errors.

Clear your question… on mouse down or click

On mouse down. Or zoom start. Basically whenever the user starts to do zoom, scale, or move the plot. I know there is a basic plotly click event but it occurs after mouse up.

this is the list of the event which can be called.

If you want to update the plot then I can help you whatever method you choose on page reload or ajax call .the above link is used for events.

i need a favour from you ?

kindly read the latest question ?

Actually, I think it might be a bug?

It looks like there is no mousedown event or on start zoom event in the events link you posted…

The plot updates correctly. The issue is when the user begins to zoom. If the user clicks on the plot without releasing the mouse (which causes a mouse down event to trigger but not a plotly click event to trigger) then 'Uncaught (in promise) undefined" errors are reported in the console.

Below is an example. If you mousedown on the plot without releasing the mouse you’ll see errors reported in chrome console. For whatever reason the errors do not show up in the codepen console.

Yes there is no event of mouseDown in plotly.

kindly please read my question i need help …