🌍 Public
Viewing a saved revision (read-only)
1708714c9f504044906780ab6ecfa37f
Bowl of Fruit - General Update Pattern2
This example demonstrates the General Update Pattern, where a set of SVG circles representing fruit in a bowl is dynamically added, removed, and modified. Over a few seconds, apples disappear, and one apple transforms into a lemon, with each fruit’s color and radius encoded via `scaleOrdinal`. The visualization uses d3’s selection/merge API (`groupsEnter.merge(groups)`) to animate transitions smoothly. The code relies on d3.v6 and a custom `fruitBowl` function driven by `setTimeout` calls.
AI-generated description