🌍 Public
Viewing a saved revision (read-only)
7902c3eb92b24092920a8e275eba07da
RS Bowl of Fruit - General Update Pattern
Five circles representing apples appear and shrink to zero when removed, while one apple is replaced by a lemon mid-animation. This general update pattern uses D3 v5's data join with key functions to track objects by ID, merging enter and exit selections with `transition().duration()` to animate radius changes. The code defines ordinal scales for fruit color and size, with random IDs generated for each data point.
AI-generated description