Skip to main content
100%

Bowl of Fruit - General Update Pattern2

✓ Published1🌍 Public
Rrainyrainyguo
Last edited Nov 14, 2020
Created on Nov 14, 2020

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
MIT Licensed

Similar vizzes