question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
brian428commented, Oct 4, 2018

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

0reactions
etpinardcommented, Oct 31, 2018

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Draw error in scattergl for plot with markers and lines traces
If you press the autoscale the last trace appears. This happens only if you plot trace in the following order: [Marker Trace 1,...
Read more >
Python Figure Reference: scattergl Traces - Plotly
Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items....
Read more >
plotly.graph_objects.Scattergl — 5.11.0 documentation
mode – Determines the drawing mode for this scatter trace. name – Sets the trace name. ... Sets the data corresponding the length...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found