Hello plotly community!
I have a scatterplot with animation on top using shapes. The animation works fine as long as I use go.Scatter:
The animation resembles how a single point changed position over time. You can see the dots as places and the user as moving from place to place.
The app functions as follows:
- User provides initial location
- User adds another location
- Hit “play” or repeat step 2;
I use shapes to draw the animation, which enables me to use animations on scattergl. Given there are many datapoints, go.Scatter is not suitable.
Here’s what happens after I add the next location using scattergl (note that I repeat the animation by hitting play after it finishes):
All good, but then… As soon as I add another location to the history of the user, the scattergl disappears.
Code details can be found here
I have tried many things:
redraw=True # same issues + super slow
- delete figure and / or re-use figure data
- Replace the entire dcc.Graph instead its figure property
- reduce number of frames because perhaps had to do with this
I’m really dumbfound on this one.