Bowl of Fruit - General Update Pattern Special Cases
Fruit shapes in an SVG bowl demonstrate D3’s general update pattern with enter, update, and exit selections. Apples and lemons are rendered as circles with a color scale and radius scale, transitioning size and fill based on the fruit type. The code uses `scaleOrdinal`, selection joins on `<g>` elements, and `.merge()` to handle updates, while click events change the selected fruit’s ID. A timer sequence pops an apple after one second, replaces one with a lemon at two seconds, and filters out another at three seconds.