Skip to main content
100%

Transitions

✓ Published0🌍 Public
AAlainRo
Last edited Feb 28, 2018
Created on Feb 28, 2018

Three circles, initially stacked at the left edge of an SVG canvas, animate horizontally across the frame when the "Go" button is pressed, then return to their start positions with "Go Back." The example demonstrates D3 v4's transition system using `d3.selectAll('circle').transition()` with a staggered `delay` based on each circle's index, a fixed `duration`, and a linear `ease`. The circles are hard-coded in the markup, and the animation is triggered by inline `onclick` handlers that call the `go()` function with a boolean flag. The code highlights how D3's `transition.attr` can smoothly interpolate CSS properties like `cx` across multiple elements.

AI-generated description

Transitions

mit Licensed

Similar vizzes