Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Bowl of Fruit - Hover to Select

Public visualization

Bowl of Fruit - Hover to Select

0 stars0๐ŸŒ 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

Comments

Sign in to join the discussion.

MIT Licensed