.animate method that can handle any type of figure diff
See original GitHub issueIn Dash, I’d like users to be able to toggle on and off an animate
property which would either smoothly transition points (if available) or just update the chart.
Right now, Plotly.animate
doesn’t work with all chart transitions and data transitions. While I could program this myself in the Graph component, it would be great if plotly.js
could do this so that everyone could benefit. We could even use this in the workspace to smooth out transitions!
Ideally, I would just replace the .newPlot(id, data, layout)
call with a .animate(id, data, layout)
call and call it a day.
In particular, here are some of the edge cases:
.animate
to work before.plot
is called.animate
to work across all chart types (even if it’s not a smooth animation).animate
to autorange (expand axes if the new data was larger than the existing data).animate
when new traces are added or removed.animate
when chart types have been changed
I’m OK if this is a new method or a new config option or whatever.
cc @rreusser @alexcjohnson @etpinard @cpsievert @monfera @jackparmer
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:14 (13 by maintainers)
Top GitHub Comments
FWIW I would favour having an
animate
flag somewhere such that.react()
would animate a transition or something like that, rather than a.animate()
method.That’s arguably not always the desired behavior. We’ll probably need another attribute.
Related: