Bowl of Fruit - General Update Pattern Special Cases
This example demonstrates the general update pattern's special cases by showing a bowl of fruit that changes over time: apples are eaten, one apple is replaced with a lemon, and another apple is removed. Using D3 v5’s `selectAll`, `enter`, `merge`, and `exit` methods, the code updates SVG groups and shapes incrementally. Ordinal scales from `d3` map fruit types to colors and radii, while `setTimeout` triggers sequential state changes in the data array.