Bowl of Fruit - General Update Pattern Special Cases
This example demonstrates the general update pattern in D3 with special cases for data joins that add, remove, and modify elements. It uses a bowl of fruit rendered as SVG circles, with apples and lemons distinguished by size and color via d3.scaleOrdinal. The code employs d3.select, selection.data, selection.enter, selection.exit, and selection.merge to handle updates, while setTimeout triggers staged changes to the fruit array.