Bowl of Fruit - General Update Pattern
This example demonstrates the general update pattern for dynamic data visualizations, showing a bowl of fruit that changes over time as apples are removed and one apple transforms into a lemon. The visualization uses SVG rendering with animations to smoothly transition between states. The code employs d3.v5’s selection, merge, and transition APIs, including `selectAll`, `groups.enter()`, `groups.exit().transition().remove()`, and `.transition().duration(500)` to animate position, radius, and color changes. It uses `scaleOrdinal` from d3 for both color and radius scales, with data-driven updates triggered by `setTimeout` calls.