Skip to main content
100%

Bowl of Fruit - Hover to Select

✓ Published0🌍 Public
BbeauMarko
Last edited Oct 2, 2020
Created on Oct 2, 2020

A bowl of fruit rendered as SVG circles animates through a sequence of apples being eaten and one apple morphing into a lemon. Hovering over any fruit highlights it with a black stroke, using the `setSelectedFruit` callback to update the selected state. The visualization leverages D3 v5's data joins and `transition().duration(1000)` to smoothly animate circle radii and positions, with `scaleOrdinal` mapping fruit types to colors and sizes. The React-based code imports specific D3 functions like `select`, `range`, and `scaleOrdinal` to drive the interactive SVG rendering.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes