Bowl of Fruit - General Update Pattern Special Cases
This example demonstrates the General Update Pattern with special cases, animating a bowl of fruit where data joins and exits alter the visual composition. Using D3 v5 with SVG rendering, it shows how elements transition, merge, and are removed when the dataset changes. The code employs `d3.select`, `data.join`, and `transition.attr` to handle enter, update, and exit selections, with circles and text representing fruit types. Rendering is entirely in-browser, driven by an interactive button that cycles through datasets, highlighting edge cases like overlapping transitions and multi-element updates.