Bowl of Fruit - Nested General Update Pattern
This example demonstrates the nested general update pattern for animating data-driven changes in an SVG scene. Six fruit elements, initially all apples, are rendered in a bowl using D3 v5’s `scaleOrdinal` for color and radius, with circles and text labels bound to a `g` element per fruit. Over time, the data array is modified by removing or replacing items, and the pattern correctly handles transitions for entering, updating, and exiting groups. The code explicitly uses selection joins with `.enter()`, `.merge()`, and `.exit()` to manage the nested structure.