Skip to main content
100%

SVG Lots of Transitions

✓ Published0🌍 Public
Aandrew-reid
Last edited Jul 28, 2018
Created on Jul 27, 2018

This example shows a grid of 19,200 small SVG rectangles that simultaneously reverse their positions and change color from steelblue to lightgreen over three seconds. The animation creates a sweeping wave effect as each rectangle’s transition delay is based on its original row and column index. The code uses D3 v4 with `selection.transition()`, `duration()`, and `delay()` to orchestrate the movement, while the SVG attributes `x`, `y`, `width`, and `height` define the grid layout. The data is generated with `d3.range()` and positioned using modular arithmetic.

AI-generated description

See also the canvas version.

Similar vizzes