Skip to content

Problems with addTraces and scattergl #1083

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
cpsievert opened this issue Oct 25, 2016 · 7 comments · Fixed by #1175
Closed

Problems with addTraces and scattergl #1083

cpsievert opened this issue Oct 25, 2016 · 7 comments · Fixed by #1175
Labels
bug something broken

Comments

@cpsievert
Copy link

http://codepen.io/cpsievert/pen/LRamoV/

This pen actually crashed my browser, but I've also seen this error trying to do a similar thing with version 1.18.1

WebGL: INVALID_OPERATION: drawArrays: no buffer is bound to enabled attribute
@etpinard etpinard added the bug something broken label Oct 25, 2016
@etpinard etpinard added this to the On-par gl2d milestone Oct 25, 2016
@etpinard
Copy link
Contributor

another potential issue for @dfcreative

@dy
Copy link
Contributor

dy commented Oct 25, 2016

Ok

@dy
Copy link
Contributor

dy commented Nov 11, 2016

Hm.

let data = [{x:[...], y:[...]}];
Plotly.plot(container, data);
Plotly.addTraces(container, data); //← we pass already existing data

What is expected behaviour when we try to add existing data? Should we ignore it or copy it to new trace @etpinard? I guess cloning is reasonable if user can update data later.

@dy dy mentioned this issue Nov 11, 2016
@dy
Copy link
Contributor

dy commented Nov 11, 2016

#1136 should help with that.

@etpinard
Copy link
Contributor

Oh. Actually, this has nothing to do with the gl2d code - as @dfcreative points out in #1136.

More generally, @cpsievert, what do you expect to happen here? In your codepen, you're calling addTraces with the same trace object as in your first plot call. Should addTraces add a second (identical) trace to the graph? Or should addTraces look up its uid to figure out that the user wants to update the existing trace instead?

@cpsievert
Copy link
Author

Should addTraces add a second (identical) trace to the graph?

yea, that's what I would want/expect

@etpinard
Copy link
Contributor

thanks @cpsievert 🍻

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

Successfully merging a pull request may close this issue.

3 participants