Closed
Description
Hi !
I use an heatmap to represent large datasets. After plotly_relayout events I download and process data (asynchronous, can take some time), then display them. However Plotly will return an undefined error from a promise if the update is done while dragging. I used a setTimeout in the codepen to copy the behavior of my program.
CodePen : https://codepen.io/watashiku/pen/pKJJNW?editors=1010
Error message :
plotly-latest.js:128472 Uncaught TypeError: Cannot read property 'length' of undefined
at exports.drawData (VM750 plotly-latest.js:128472)
at Object.lib.syncOrAsync (VM750 plotly-latest.js:119125)
at relayout (VM750 plotly-latest.js:125433)
at Object.exports.call (VM750 plotly-latest.js:153164)
at VM750 plotly-latest.js:133800
at Object.lib.syncOrAsync (VM750 plotly-latest.js:119125)
at Object.dragTail [as doneFn] (VM750 plotly-latest.js:133798)
at HTMLDocument.onDone (VM750 plotly-latest.js:102144)
Steps to reproduce : drag the plot once, then quickly start dragging again and hold it one second - the bug appears if you are dragging during the update triggered by the previous drag.
It creates two major problems :
- The plot will be "locked" on the screen : panning or zooming will not affect the plot (only the axes in the background),
- There is no plotly_afterplot event triggered by Plotly which means there is no way for me to tell the user that the plot is ready nor somehow handling the situation by myself (and the error cannot be catched outside of Plotly due to the way it is raise I think?).
Notes :
- When the bug happens clicking on the graph fixes it
- The behavior is similar for react, restyle and addtrace. It does not appear with plot (but this creates traces for every relayout)
Metadata
Metadata
Assignees
Labels
No labels