Skip to content

Plotly.react and scattergl #3405

Closed
Closed
@deto

Description

@deto

I've been trying to update a plot containing scattergl traces dynamically with Plotly.react.

However, I've found that in some cases, some of the points are missing and I get a "glDrawElements: attempt to access out of range vertices in attribute 0" error in the console.

I've isolated a minimal example of this at the following codepen:
-- https://codepen.io/anon/pen/JwvEgE

What this codepen is doing:

a) Create a plot with a single scattergl trace with N points (with Plotly.newPlot)
b) Update this plot to instead contain a scattergl trace with M points (with Plotly.react)

In the final plot, the trace has many points not rendering for me (on up-to-date Chrome 71.0.3578.98).

This issue is unusual in that it seems to depend on the precise number of points in each trace. I've done some experiments, and it seems like it only occurs when (N > 10,000) and (M <= 10,000), which makes me think that perhaps arrays are being handled differently based on their size and something incompatible is resulting.

I know a different Plotly.react + scattergl issue was reported before, but that one seemed to be a bit different.

Metadata

Metadata

Assignees

Labels

bugsomething broken

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions