Fork of Bowl of Fruit - General Update Pattern Special Cases
This example demonstrates the general update pattern in D3 v5, showing how to handle special cases when adding, removing, and modifying data-bound elements. It visualizes a bowl of fruit where apples and lemons are represented by colored circles, with SVG `<circle>` and `<text>` elements updated through `selection.merge` and `selection.exit`. The code uses `d3.scaleOrdinal` for color and radius mapping, and triggers three sequential updates via `setTimeout`: removing a fruit, changing an apple to a lemon, and filtering out another fruit.