Skip to content

ScatterGl line2d error toggling trace mode to/from "lines+markers" #3076

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

Closed
brian428 opened this issue Oct 4, 2018 · 5 comments
Closed

ScatterGl line2d error toggling trace mode to/from "lines+markers" #3076

brian428 opened this issue Oct 4, 2018 · 5 comments

Comments

@brian428
Copy link

brian428 commented Oct 4, 2018

Testing 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.

@etpinard
Copy link
Contributor

etpinard commented Oct 4, 2018

Thanks for writing in. I'm not obvious to me how that can happen.

I haven't been able to reproduce this bug https://codepen.io/etpinard/pen/ReRNzM

@brian428
Copy link
Author

brian428 commented Oct 4, 2018

OK, I'll see if I can create a repro case. Thanks.

@etpinard
Copy link
Contributor

etpinard commented Oct 5, 2018

Maybe related to: #3004

@brian428
Copy link
Author

brian428 commented Oct 5, 2018

Yes, that sounds exactly the same. Like the submitter for that issue, I am also having trouble reproducing it in a codepen. I have some charts where it seems to work fine and others where it throws the error, but there's not much different between them other than the data values, so I'm somewhat baffled. I'll keep at it.

@etpinard
Copy link
Contributor

etpinard commented Oct 31, 2018

We released a fix for #3004 (which seems very much related to this ticket) in 1.42.0, so I'll close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants