Bowl of Fruit - General Update Pattern
✓ Published2🌍 Public
Five circles representing apples shrink away and are replaced as a lemon appears, demonstrating D3's general update pattern through enter, update, and exit selections. The example uses `scaleOrdinal` for fruit type colors and radii, with `transition().duration(1000)` animating circle resizing and removal. Data flows through `data(fruits, d => d.id)` keyed by random IDs, while the `fruitBowl` function manages the merge and exit transitions.
AI-generated descriptionMIT Licensed