Skip to main content
100%

Bowl of Fruit - General Update pattern

✓ Published1🌍 Public
KKaleb LaBarrie
Last edited Sep 10, 2021
Created on Sep 10, 2021

D3.js demonstrates the General Update pattern with a bowl of fruit where apples and lemons enter, exit, and change type. Using `d3.scaleOrdinal` for color and radius, circles transition smoothly over one second via `transition().duration()`, with enter selections growing from radius zero and exit selections shrinking away. The example shows both the enter-merge-exit structure with keyed data joins and dynamic updates triggered by `setTimeout`.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.

MIT Licensed

Similar vizzes