-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Can Plotly Dash animations display buttons and sliders? #189
Comments
Thanks for reporting! This should work. Dash.jl and PlotlyJS.jl use the same plotting backend. What's most likely happening is that We could try to patch Lines 3 to 7 in 4866259
accordingly. |
@etpinard Oh thanks for the response. Okay, so is this code that would go into a Dash.jl pull request or something that I can just add to my own code to override the existing dispatch? Should I try and submit this code change as a PR? |
Yep, ideally it would go in a Dash.jl pull request. This is a bug we want to fix! |
I can submit a PR, no problem. Is there a test case that I should add to try this, or do I not need to add an additional test case. I have not submitted a PR to Dash.jl before, so just want to make sure I do it correctly. |
Unfortunately, similar PRs #143 and #166 relied on integration tests to lock down their patches. If you can get the integration test running on your machine, adding a similar integration test file would be fine. Otherwise, a new |
@etpinard say, as a temporary workaround, can I just write my own Play button and Slider using Dash components? I can compute the frames and save them in a Store, and then load them manually. I was not sure how to update a frame in a plot though--is that possible? I only have 1 animated trace out and 3 static traces in my plot. If I just update the |
I am working on creating some dash animation. Now I am able to create some animations using PlotlyJS, but I cannot seem to get that same buttons and sliders to appear on a Dash webpage.
I was following this animation example, and the plots appear but the animation does not seem to appear--nor the buttons. In the code below I just have a button for the animation, but I also have other examples of PlotlyJS code with sliders.
One solution is to basically just generate the animation frames in the background, save them to a
dcc_store
, and then write my own play button and slider controls--using existing plotly components--to pull the frames from the store and display them. I can certainly do that, but was not sure if that is a good idea. The primary concern would be speed or performance on this kind of manual animation. So I was not sure if should write the manual method, or I should rely on those internally generated buttons usingupdatemenus
and the slider layout argument in Plotly.I have the code below, so I was hoping that someone might indicate whether the functionality to display this animation is not yet available, or whether I have coded this example incorrectly. Note that I am not getting any errors on in the webpage debug indicators or in the terminal.
I posted a similar question to this on the community forum. In that case I was just asking whether someone knew whether this code should work or whether I should post an issue about it. But no one has responded to that message yet, so I figured I would just post to the Issues list.
The text was updated successfully, but these errors were encountered: