Bowl of Fruit - Interactive
✓ Published0🌍 Public
Ggmille22
Last edited Apr 21, 2020
Created on Apr 21, 2020
This interactive example uses D3 v5 to visualize a bowl of fruit as colored circles on an SVG canvas. Apples appear as red circles and lemons as yellow ones, with their radii scaled by fruit type via `scaleOrdinal`. The visualization dynamically updates over time: the fruit count decreases, one apple transforms into a lemon, and an apple is removed from the sequence. Clicking on fruit triggers an `onClick` handler that selects a fruit, though the code does not visibly alter the rendering based on that selection.
AI-generated descriptionMIT Licensed