Bowl of fruit - Nested version of general update
✓ Published1🌍 Public
This example demonstrates the nested version of the general update pattern for D3 data joins. A bowl drawn as an SVG rectangle contains five apples, each rendered as a circle with a text label, using ordinal color and radius scales to distinguish fruit types. Over time, timeouts trigger state changes that remove apples, replace one with a lemon, and filter out another, showing how enter, update, and exit selections handle transitions. The code uses `d3.select`, `scaleOrdinal`, and explicit `.enter()`, `.merge()`, and `.exit()` methods to manage groups and their nested circle and text elements.
AI-generated descriptionMIT Licensed