Skip to content
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

Single-point or empty trace is not updated with slider #7293

Open
filipesmg opened this issue Dec 2, 2024 · 0 comments
Open

Single-point or empty trace is not updated with slider #7293

filipesmg opened this issue Dec 2, 2024 · 0 comments
Labels
bug something broken P3 backlog

Comments

@filipesmg
Copy link

I'm trying to create a plot with a slider that will change all the traces. I have started with the example on the plotly page here and I have created a code pen to show a few problems I have noticed:

  • If I don't have originally the same number of traces (that is, if line 10 is commented), then new traces are not added on the other steps/frames - even though I'm adding them to the "data" object, which I believe should be completely updated.
  • Even when I have now the same number of traces, if one of them has a single point (lines 90/91) or is empty, then the trace is not updated completely: in the code pen example, moving to green will add the second line trace, then going back to red will move the point but the green line is stuck there. For graphs with at least 2 points (for example, changing the lines 90/91 to at least 2 points (e.g. x:[2,3], y:[1,1],)) the issue is not present.

I believe the data object is not being updated completely, which is something I'd have expected it to do.

PS: I have noticed similar problems with sliders without the "animate", although the objects seem - strangely - to be different (for example, in this codepen I have to pass arguments as x: [[1, 2, 3]], y: [[2, 1, 3]], in args to update more than one trace, but the issue of having to have at least one trace and traces not updating are also there.

@gvwilson gvwilson added bug something broken P3 backlog labels Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P3 backlog
Projects
None yet
Development

No branches or pull requests

2 participants