Bowl of Fruit - Hover to Select
✓ Published0🌍 Public
This example demonstrates a data join with smooth SVG transitions as a bowl of fruit updates over time. Circles representing apples and lemons enter, exit, and change type, with color and radius mapped through `d3.scaleOrdinal`. Hovering highlights a fruit by updating a `selectedFruit` state, which triggers a re-render via `fruitBowl`. The code uses `selection.merge`, `transition.attr`, and mouse event listeners within a D3 v6 module.
AI-generated descriptionAn example including some commonly used features of SVG.
MIT Licensed