Bowl of Fruit - General Update Pattern
✓ Published2🌍 Public
A bowl of fruit demonstrates the general update pattern for data joins, animating circles in and out as the dataset changes. Apples and lemons render as colored circles using an ordinal color scale and an ordinal radius scale, with position determined by index. The example uses D3 v5 selections with `selection.data`, `enter` and `exit` transitions, and `merge` to handle updates. Three timed actions shift the data: removing an apple, swapping one apple for a lemon, and filtering out another fruit, each triggering a one-second transition on circle radius and x-coordinates.
AI-generated descriptionMIT Licensed