🌍 Public
Viewing a saved revision (read-only)
babf3f5e43a54092a7820bfcb86a638d
Bowl of fruit - General update pattern
Five apples appear as red circles in an SVG bowl, then one disappears and another turns yellow. The demo shows D3’s general update pattern, using `selection.data`, `.enter`, `.merge`, and `.exit` to bind an array of fruit objects to `circle` elements. `d3.scaleOrdinal` maps fruit types to fill colors and radii via `colorScale` and `radiusScale`, while `setTimeout` triggers the state changes.
AI-generated description