🌍 Public
Viewing a saved revision (read-only)
b8a5cbe3442e418b8305c24138a0dce2
Intro to Nested Objects
Five fruit circles start as apples and animate through a scripted sequence of updates, removals, and a type change to lemon. The example demonstrates the nested update pattern using `selection.data`, `enter`, `merge`, and `exit` with `d3.transition` to animate SVG circle radii, fills, and positions, plus text labels. It uses `d3.scaleOrdinal` for color and radius mapping, and stores a random `id` in each fruit object for keyed data binding.
AI-generated description