Bowl of Fruit - Hover to Select
✓ Published0🌍 Public
Five fruit circles, colored red for apples and yellow for lemons, sit in a row across an SVG canvas. Hovering over a circle selects it, drawing a black outline via mouseover and mouseout events that call the `setSelectedFruit` callback. The example demonstrates data joins with `selection.data`, `enter`, and `exit`, animating radius changes through `transition().duration(1000)`. Timed updates remove and replace fruits, changing their type and scale using `scaleOrdinal` for both color and radius.
AI-generated descriptionMIT Licensed