ScatterGl line2d error toggling trace mode to/from "lines+markers"
See original GitHub issueTesting with Plotly 1.41.3.
I’ve got a ScatterGL plot that allows users to turn on and off “lines+markers” mode. This worked in the past, but now I’m getting the error “scene.line2d.destroy is not a function” when making this mode switch and updating the plot (I’m using react()
to make the update).
The error gets thrown from here: https://github.com/plotly/plotly.js/blob/master/src/traces/scattergl/index.js#L316. Using a breakpoint, I’m able to see that the problem is that the value of scene.line2d
is set to true
instead of being set to an object reference. So the call to line2d.destroy()
to blowing up.
I’ll try to create a repro case, but I was hoping that someone on the Plotly team may just know how/where the line2d
value could be getting set to true
instead of set to an object reference.
Or, maybe it would be prudent to modify that destroy()
function to check that the values about to be invoked are actually functions, instead of the loose test for truthiness that is there now? Because obviously Plotly can get into a state where these are set to booleans rather than object references.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
OK, I’ll see if I can create a repro case. Thanks.
We released a fix for https://github.com/plotly/plotly.js/issues/3004 (which seems very much related to this ticket) in 1.42.0, so I’ll close this issue.