click and hover to select
✓ Published0🌍 Public
A bowl of fruit demonstrates selection and dynamic updating. Apples and a lemon are shown as circles with radii and colors mapped via `d3.scaleOrdinal`. Clicking or hovering over a fruit triggers a callback that updates a `selectedFruit` ID, adding a black stroke to the selected item and clearing it on mouse-out. The `bowl` function uses SVG `<circle>` and `<rect>` elements, with `transition().duration(750)` animating position and radius changes when the fruit array is modified over time.
AI-generated descriptionMIT Licensed