Skip to main content
100%

Bowl of Fruit - Hover to Select

✓ Published0🌍 Public
Ffbudwill
Last edited May 4, 2020
Created on May 4, 2020

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 description
MIT Licensed

Similar vizzes