You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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:
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.The text was updated successfully, but these errors were encountered: