Skip to content

.animate method that can handle any type of figure diff #1849

Closed
@chriddyp

Description

@chriddyp

In 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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions