🌍 Public
Viewing a saved revision (read-only)
4c0dc831287a49ff870433a4b30a740b
Bowl of Fruit - General Update Pattern (Nested Version using groups)
Five pieces of fruit render inside a rounded bowl shape drawn with an SVG rect. The visualization demonstrates the general update pattern with nested groups: a separate data join manages the bowl’s persistent rectangle, while another join handles fruit circles and labels. Over timed intervals, `setTimeout` removes fruit, changes an apple to a lemon, and filters the array. D3 v5’s `scaleOrdinal` maps fruit types to colors and radii, and the enter-merge-exit sequence updates the SVG groups accordingly.
AI-generated description