🌍 Public
Viewing a saved revision (read-only)
05e6d4a56a464a56b9fec0b083c24a99
Bowl of Fruit - General Update Pattern - Nested Object
A bowl of fruit demonstrates the general update pattern with nested selections in D3 v6. Apples and lemons are rendered as SVG circles in a bowl, with color and radius determined by fruit type via `scaleOrdinal`. The example shows how entering, updating, and exiting elements are handled through `selection.merge`, `groups.exit().remove()`, and re-bound data arrays. Timed transitions remove fruits, replace an apple with a lemon, and filter an element, illustrating how nested object data with unique IDs drives stable updates.
AI-generated description