Bowl of Fruit - General Update Pattern Special Cases
This example demonstrates D3’s general update pattern with special cases for entering, updating, and exiting elements in a fruit bowl visualization. Five apples appear initially; one is removed, another is replaced by a lemon, and a third apple is deleted, showing how `selection.join` handles groups via `enter`, `merge`, and `exit`. The code uses `d3.scaleOrdinal` for colors and radii, and appends SVG `rect`, `circle`, and `text` elements. Data is plain JavaScript objects, with updates triggered by `setTimeout` calls.