I am developping a Dash app in python, containing a plotly animation.
My app is initialized with an empty graph and an upload button. When the upload button is clicked and content is uploaded, an animated figure is created in a callback and returned. I am
trying to use uirevision=True in the returned figure’s layout, but the camera is reset at every step of the animation. If I don’t return the figure but show it inside the callback (fig.show() ) it works as intended, that is, the camera does not get reset at each animation step. Therefore this only seems to happen when returning the figure as the output of the callback.
To prevent the camera from resetting during animation steps in your Dash app, ensure that the uirevision property is set consistently across updates. This property should be assigned a value that does not change with each callback, allowing the user’s UI state, like the camera view, to be preserved. aarpmembership
Hi @WayneF11 , thanks for your reply.
I have tried that but to no avail.
It seems that scatter3d ignores this property. I’ve tried it with scatter and other types of 2D plot and it worked fine but as soon as I use scatter3D it doesn’t. This has been reported here:
Months late but any update? I am stuck with the same problem. My callback returns a figure but using fig.update_layout(uirevision=…) is not working. To generate my figure I am using fig.add_trace(go.Scatter(…))