Skip to main content
100%

Create an animated circle with D3

✓ Published0🌍 Public
NNita
Last edited Jan 16, 2020
Created on Jan 16, 2020

A circle in an SVG transitions through a sequence of fill colors—red, steelblue, and orange—then shrinks to a radius of zero and expands back to its original size while turning black. The example demonstrates D3 v5's chained transitions, where each `transition()` call queues a new animation stage with specified `duration` and optional `delay`. The circle is appended to the body via `d3.select`, and its position and initial radius are set with SVG attributes, while styling from the page's CSS centers the content.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes