Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of Fruit - Hover

Public visualization

Bowl of Fruit - Hover

0 stars0🌍 Public
Nnkohdatavis
Last edited Jul 24, 2020
Created on Jul 24, 2020

A bowl of fruit displays five circles that animate into apples and lemons as they enter, resize, and exit the SVG. Hovering over a circle highlights it with a black outline, and the selection state updates the stroke accordingly. The code uses a data join with `selection.data`, `enter`, `merge`, and `exit` transitions, leveraging `transition.attr` for smooth radius and position changes. D3’s `scaleOrdinal` maps fruit types to colors and radii, while mouseover and mouseout events trigger the `setSelectedFruit` state handler.

AI-generated description

Bowl of Fruit - Hover

Comments

Sign in to join the discussion.

MIT Licensed