Skip to main content
100%

Bowl of fruit hover to select

✓ Published0🌍 Public
KKurt J Nilsen
Last edited Aug 3, 2020
Created on Aug 3, 2020

A bowl of fruit rendered as circles in an SVG responds to mouse hover, with a black stroke marking the selected fruit. The visualization demonstrates data joins with entering, updating, and exiting elements, animated via `transition()` over one second. Apples and lemons differ in color and radius using `scaleOrdinal`, while d3’s `selectAll` and `data` manage dynamic changes as fruits are removed or transformed. The React framework calls the `fruitBowl` function on each state update, passing the selected fruit ID to control the stroke styling.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes