Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of fruits.js

Public visualization

Bowl of fruits.js

0 stars0🌍 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

Comments

Sign in to join the discussion.

MIT Licensed