-
-
Notifications
You must be signed in to change notification settings - Fork 544
[WIP] Animation documentation #527
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Such awesome docs -- thanks so much for adding the markdown option earlier, the text is super important for these examples and you did an amazing job of keeping the text extremely informative while concise as well !!
@@ -0,0 +1,72 @@ | |||
--- | |||
name: Animating many frames quickly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rreusser the name serves as the title of the example so I would recommend capitalizing like: Animating Many Frames Quickly
@@ -0,0 +1,44 @@ | |||
--- | |||
name: Animating sequences of frames |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
capitalize title
title: JavaScript Graphing Library Animations | Examples | Plotly | ||
name: Animations | ||
permalink: javascript/animations/ | ||
description: How to animate charts in JavaScript with the animate API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To stay consistent with the other docs you can set the description to: How to animate D3.js-based line and scatter plots in JavaScript.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can do. The only reason I didn't is that it's not limited to scatter traces or D3-based traces. See: https://rreusser.github.io/animation-experiments/#3d (the timing is not great at the moment; needs a patch)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! How about: How to animate Plotly graphs in JavaScript.
language: plotly_js | ||
page_type: example_index | ||
has_thumbnail: true | ||
display_as: basic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think this would fit better under the chart_events
category: https://plot.ly/javascript/#chart-events (https://github.com/plotly/documentation/blob/source-design-merge/_includes/documentation_eg.html#L9)?
If you do move it to chart_events
rather than basic, I would change the order to #1 (get this front and center :) )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll go with chart_events
and order: 0.5
(could readjust to integers, but… why? 😄 )
@@ -0,0 +1,38 @@ | |||
--- | |||
name: Object constancy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
capitalize
@@ -0,0 +1,94 @@ | |||
--- | |||
name: Frame groups and animation modes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
capitalize
@@ -0,0 +1,94 @@ | |||
--- | |||
name: Frame groups and animation modes | |||
plot_url: http://codepen.io/plotly/embed/rrZRmA/?height=500&theme-id=15263&default-tab=result |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏 👏 I love this example so much-- this is one of the coolest thing I've ever seen plotly do!!!!!!!!!!!!!
|
||
The first row of buttons animates a different set of predefined frames by changing the second argument of `Plotly.animate`. Passing `null` animates all defined frames in sequence, while passing an array of strings (here, the frames in reverse) animates a specific sequence of frames. By passing a plain string (here, `lower` or `upper`), it filters the animated frames to those with a `group` property equal to that name. | ||
|
||
The second row of buttons chnages the animation `mode`. The mode defines whether an animation either interrupts or follows the current animation. `immediate` mode discards all queued frames and begins a new sequence immediately. The `next` mode is very similar but doesn't begin the new animation until the *end* of the current frame. Finally, `afterall` queues the new frames so that the new animation begins only after all previous animations have completed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chnages
changes
sitemap: false | ||
arrangement: horizontal | ||
markdown_content: | | ||
The animate command lets you add dynamic behavior to Plotly graphs in a number of different ways. At its core, `Plotly.animate` transitions traces to a new state or sequence of states. Therefore to animate a trace, *you must first plot the trace you wish to animate*. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would probably also mention: At the moment, you can only animate scatter
traces. & you can link to the line & scatter doc to show scatter traces include line & filled line plots
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, slight subtlety. You can only smoothly transition scatter traces, but you can animate anything. If it doesn't know how to interpolate smoothly, it will just update instantaneously.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok cool! In that case I think it's good to leave as is for now and if questions/confusion come up we can add info accordingly!
@@ -0,0 +1,55 @@ | |||
--- | |||
name: Defing named frames with <code>Plotly.addFrames</code> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be Defining?
@rreusser I'm good for you to 💃 💃 this after taking a look at my comments (mostly tiny typos/grammar things) and adding the thumbnail. |
This PR adds documentation for animations. Things that remain to be done: