🌍 Public
Viewing a saved revision (read-only)
4dfcf68510b24db997b1953f02bf89da
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