Skip to main content
100%

Bowl of Fruit - General Update Pattern

✓ Published2🌍 Public
LLongYuu
Last edited Nov 25, 2020
Created on Nov 25, 2020

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 description
MIT Licensed

Similar vizzes