Bowl of Fruit - General Update Pattern + animated transitions
This example demonstrates the general update pattern in D3.js, showing a row of fruit circles that dynamically appear, disappear, and change type (apple to lemon) over time. Using animated transitions with a one-second duration, the visualization smoothly handles enter, update, and exit states, including a key-based object constancy mechanism. The code relies on D3 selections, the `.transition()` API, and scaleOrdinal scales for color and radius mapping. The animation sequence is driven by timed JavaScript callbacks that modify the underlying data array.