Dynamic plots crash webpage when zoom attempt is made (cannot read property 0 of undefined)


Apologies for the similar post but it probably requires a different fix so…

I find that when I call Plotly.react frequently (say once every 0.25 seconds), and zoom on the resultant updating plot, the webpage crashes (maybe because the plot has changed since).

I tried using fixedrange: true for both the x and y axes, but that didn’t work.

Was hoping someone knowledgeable could offer a quick fix to this issue, but I’m definitely not averse to exploring the API and, if need be, the source code further.

Thanks for your help!

Thanks for writing in.

We fixed a few Plotly.react bugs in 1.39.2 (released yesterday), so maybe try updating version.

If that didn’t work, could you share a reproducible example to help us debug?

Hmmm, it seems like it might not be a Plotly issue (wrote some example code in a html file with Plotly and it all works perfectly). I’m guessing it’s some particular interactions between certain event handlers and https://github.com/Matt-Esch/virtual-dom/ which I’m using, but I’ll continue to investigate.

Sorry for the raising a non-issue, and thanks again for replying! (same goes for the other issue)

Random (non-important) update: Also fails upon right click, but ONLY inside the plot - right-clicking on anywhere outside (labels, buttons, empty space etc.) doesn’t crash.

In the example code, right clicking on the plot doesn’t crash it, but it does stop it from updating (probably intended).

Only posting here in case others have similar issues I guess, let me know if I should stop with the updates.