Bowl of Fruit - Interaction(Hover to Select)
✓ Published0🌍 Public
MMinwoo Pak
Last edited Nov 19, 2019
Created on Nov 18, 2019
Forked from Bowl of Fruit - Interaction(Click to Select)
This example demonstrates an interactive bowl of fruit where users can hover over apples and a lemon to select them, highlighting the chosen fruit with a black outline. The visualization shows how data updates and animations work together as fruits are removed or change type over time. Each fruit is rendered as a circle using D3’s SVG API, with size and color determined by ordinal scales. The implementation leverages `scaleOrdinal` for color and radius, and uses `transition().duration(1000)` to animate the circles growing and shrinking as they enter, exit, or update.
AI-generated descriptionMIT Licensed