Simple transition chaining in v5
A blue circle moves across an SVG canvas in three sequential transitions, each lasting four seconds. First, its horizontal position animates from the left side to the right side; then its radius grows from 20 to 40 pixels; finally, its fill color changes from blue to red. This example demonstrates transition chaining in D3 v5, where calling `.transition()` after a previous transition schedules the next animation to begin automatically. It uses D3’s `transition` API with `.duration()` and `.attr()`/`.style()` methods.
AI-generated descriptionThis is a demonstration of a simple use of transition chaining using d3.js v5.
The circle moves from left to right then increases in radius and then changes colour from blue to red.
This graph is part of the code samples for the update to the book D3 Tips and Tricks to version 5 of d3.js.