Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] Animations #550

Closed
wants to merge 26 commits into from
Closed

[DO NOT MERGE] Animations #550

wants to merge 26 commits into from

Conversation

rreusser
Copy link
Contributor

@rreusser rreusser commented May 18, 2016

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
Copy link
Contributor

monfera commented May 18, 2016

@rreusser Looks very nice 🏆

@rreusser
Copy link
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

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
Contributor

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

@rreusser
Copy link
Contributor Author

rreusser commented Jun 14, 2016

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
Copy link
Contributor Author

rreusser commented Jun 16, 2016

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
Contributor Author

Based on quick slack discussion, next up: scale transitions

@@ -65,6 +65,10 @@ module.exports = {
'See `y0` for more info.'
].join(' ')
},
key: {
Copy link
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 ?

Copy link
Contributor Author

@rreusser rreusser Jun 21, 2016

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
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?

Copy link
Contributor Author

@rreusser rreusser Jun 21, 2016

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
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