Skip to content

[DO NOT MERGE] Animations - #550

Closed
rreusser wants to merge 26 commits into
plotly:masterfrom
rreusser:animations
Closed

rreusser wants to merge 26 commits into
plotly:masterfrom
rreusser:animations

Conversation

@rreusser

@rreusser rreusser commented May 18, 2016 •

Copy link
Copy Markdown
Contributor

A long-running PR to manage progress on animations.

Demo at: https://rreusser.github.io/animation-experiments
Demo source at: https://github.com/rreusser/animation-experiments

@monfera

monfera commented May 18, 2016

Copy link
Copy Markdown
Contributor

@rreusser Looks very nice 🏆

@rreusser

Copy link
Copy Markdown
Contributor Author

@monfera Thanks! Just realizing the extent to which I'm only scratching the surface of getting all aspects of this working end to end, but it's a start!

@ncammarata

Copy link
Copy Markdown

Not sure the best way to add this, but I'm very excited by the idea of using animations in my plot.ly plots!

@john-soklaski

Copy link
Copy Markdown

Wow, this looks great. I love the new demos!

@rreusser

rreusser commented Jun 14, 2016 •

Copy link
Copy Markdown
Contributor Author

Thanks @john-soklaski! Just got to the step where I need to revisit the tests and figure out what's failing. 😬 A couple more fun ones here:

https://rreusser.github.io/gaussian-mixture-estimator/
https://rreusser.github.io/kmpp/

@rreusser

rreusser commented Jun 16, 2016 •

Copy link
Copy Markdown
Contributor Author

Have managed to extend most of scatter traces to persist and transition SVG elements. Here's a demo that includes keys, error bars, points, lines, and fills:

https://rreusser.github.io/animation-experiments/#error-bars-4

The fill/line transitions technically work fine, but they're ugly when the points don't match up just right, so Q:

What are the top priorities?

  • fix up lines and fills (reordering fill points or using this trick)
  • transition scales and work in some layout properties
  • polar plots are totally different and will take work even just to prevent them from totally not working
  • declarative structure for setting up frames and a slider or similar to transition between
  • per-frame annotations or layout properties (like zooming in on a region in a particular frame)

@rreusser

Copy link
Copy Markdown
Contributor Author

Based on quick slack discussion, next up: scale transitions

'See `y0` for more info.'
].join(' ')
},
key: {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rreusser how are these different to trace.uid ?

Is there a case, in general, where multiple traces would share the same key ?

@rreusser rreusser Jun 21, 2016 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trace.uid is a single key per trace. key is an array of keys for every data point in a trace. So if some data points drop out, object constancy is maintained, i.e. https://rreusser.github.io/animation-experiments/#error-bars-4 (if you can ignore the fill/line issue for a moment, the points are matched by key instead of by array index)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha I see. Thanks for the clarification.

Maybe key should default to the calcdata indices of the first plot call?

@rreusser rreusser Jun 21, 2016 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it would default to integer keys, but anything keyable is permissible? (e.g. key=['Argentina', 'Afghanistan', ...])

Edit: Wait, isn't this what d3 does implicitly? If it's not keyed, then it really doesn't need to construct or use keys at all, right?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but anything keyable is permissible?

Yeah. That sounds right.

@rreusser rreusser changed the title [WIP] Animations [DO NOT MERGE] Animations Jun 21, 2016
@rreusser rreusser closed this Jun 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature something new

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants