Skip to main content
100%

Bowl of fruits.js

✓ Published0🌍 Public
DDavideSanto
Last edited Mar 28, 2020
Created on Mar 28, 2020

Bowl of fruits.js demonstrates the D3 data-join pattern with enter, update, and exit selections. Five circles, initially apples, are rendered in SVG; a timer pops one fruit, another timer changes a fruit’s type to lemon, and a final filter removes an element. The example uses `selection.merge` to manage updates and `selection.exit` for removals, with `d3.scaleOrdinal` mapping types to fill colors and radii. It shows how array mutations trigger re-renders of the same chart.

AI-generated description
MIT Licensed

Similar vizzes