Skip to main content
100%

Bowl of Fruit - Click to Select

✓ Published0🌍 Public
SSergio Eijben
Last edited Nov 9, 2020
Created on Nov 9, 2020

A bowl of fruit renders as a row of red apples and yellow lemons, each drawn as an SVG circle that animates its radius and position over one second. Clicking a fruit logs its unique ID to the console, though no visual selection state changes. The example demonstrates data joins with `selection.data`, enter and exit transitions via `transition.attr`, and a color scale from `scaleOrdinal`. Fruit data is generated with `range` and `Math.random`, then mutated over time by replacing an apple with a lemon and removing items to show animated updates.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes