-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'r.scatter2d.destroy is not a function' error when updating a plot using scattergl and Plotly.react #3004
Comments
Hmm. I can't replicate. I don't see any console errors. |
Plotly.js 1.41.1 and also using the EDIT: Just confirmed that you can avoid this bug by using For my particular reproduction case with my App:
Error with:
|
It reproduces on 3 of 5 machines I've tried it on. All are windows machines, so I'm not sure what the difference is on the two that don't show the error. I forgot to note in the original post...I do not get it on the opening draw in the codepen link. I have to let it draw, then click run again to get the error. As arlowhite noted, using 'scatter' instead of 'scattergl' avoids it. Like newplot though, scatter is very slow for large amounts of data for me so I would like to avoid it. |
@antoinerg can you try this out on Windows? Thanks! |
This bug appeared when i updated from 1.38.1 to 1.41.1. Tested on two mashines using Chrome 69.0.3497.100 and linux Ubuntu 18.04. Bug appears when changing layout and calling Plotly.react. |
Can you be more specific? Could share a minimal reproducible example in a codepen to help us out? |
The Dash app here can reliably reproduce this issue: plotly/dash-core-components#313 (comment). Also potentially related to #2999? |
I am getting
'Uncaught TypeError: r.scatter2d.destroy is not a function
at Object.E.e._scene.r.destroy (plotly.min.js:7)
at Object.r.clean (plotly.min.js:7)
at Object.v.cleanPlot (plotly.min.js:7)
at e (plotly.min.js:7)
at Object.l.syncOrAsync (plotly.min.js:7)
at r.plot (plotly.min.js:7)
at Object.l.syncOrAsync (plotly.min.js:7)
at Object.r.react (plotly.min.js:7)'
when trying to update a plot with new data using Plotly.react. I have a codepen that reproduces it:
https://codepen.io/rhamner/pen/GXdzLg
What should happen in the codepen is:
Instead, it stays on data set 1 and throws the error above. I thought at first data set 2 was bad, but the first plot seems to work just fine and it's identical data. Further, after throwing that error, even trying to plot the original data seems to fail.
Switching to Plotly.newPlot seems to work fine, but it's quite slow so I would really like to avoid that.
This is plotly.js 1.40.1 and I am using chrome. It also happens with firefox for me.
The text was updated successfully, but these errors were encountered: