Intro to Nested Objects
✓ Published0🌍 Public
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 descriptionMIT Licensed