3 ms·
This looks fantastic and is as close as an imperative API gets to being declarative. I dug into the documentation a little bit and didn't see much regarding an
by xrd 4y ago
This looks fantastic and is as close as an imperative API gets to being declarative.
I dug into the documentation a little bit and didn't see much regarding animation. It looks like the word transitions is used as a data transform in the plot API and not as a CSS transition? I'm unsure if there is another keyword to use when searching. I didn't find much about doing any kind of animations with this library, other than that you need to start customizating using D3 API inside the plot calls.
I'm interested in simple animations like "when this chart displays for the first time, start with data at zero, then animate to the final state." Is that possible with plot? I'm not looking for animation across different sets or shapes of data.
- tophtucker 4y agoThere’s no animation built-in currently. But it’s fast enough that you can often just throw away and re-render the Plot (i.e. handle the animation externally). Mike Freeman made a helper function that adds that sort of animation (data gradually coming in) using D3 atop Plot: https://observablehq.com/@mkfreeman/plot-animation https://observablehq.com/@mkfreeman/plot-animation You could upvote this incremental rendering issue: https://github.com/observablehq/plot/issues/328 https://github.com/observablehq/plot/issues/328 Or this one for adding a “time channel” to do data-driven animation (for which there’s an old draft PR): https://github.com/observablehq/plot/issues/166 https://github.com/observablehq/plot/issues/166