Skip to main content
100%

General update pattern

✓ Published2🌍 Public
Eevapavlinek
Last edited Apr 7, 2020
Created on Apr 7, 2020
Forked from Let's make a face!

The example demonstrates the D3 general update pattern, animating a row of fruit circles as apples are added, removed, and replaced with lemons over time. It uses d3.select and d3.range to manage data, and the fruitBowl module applies enter, merge, and exit selections with transition.attr to animate circle radius and fill color. Rendering occurs in SVG via a React-free vanilla JavaScript setup, with d3.scaleOrdinal mapping fruit types to colors and sizes. The data consists of a mutable array of fruit objects, each with a random id for keying.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes