🌍 Public
Viewing a saved revision (read-only)
01b6e0e9a2544ee1b749bed992cd3a8b
Fruit - Update Pattern - Nested
Five fruit bowls render as SVG circles and labels, using an update pattern to animate changes to the data array. The example cycles through eating apples and replacing one apple with a lemon, with transitions on position, fill color, radius, and text. The code uses D3 v5 selections with enter, merge, and exit, applying `transition().duration()` for staggered animations. Fruits are generated randomly, and nested selection patterns handle updates to circles and text elements within each group.
AI-generated descriptionLearn about update pattern - from video