Bowl of Fruit - General Update Pattern
This example demonstrates the general update pattern for dynamic data visualization, showing a bowl of fruit where items are added, removed, or changed over time. The scene, rendered as SVG, depicts apples and lemons as colored circles with labels, initially displaying five apples, then sequential updates simulate eating an apple, replacing one with a lemon, and removing another. The code uses d3.scaleOrdinal for color and radius mappings, while the fruitBowl function manages enter, update, and exit transitions using D3's select and merge operations.