Bawl of Fruit data update pattern
This example demonstrates a dynamic data update pattern for a simple scatterplot of fruit represented as colored circles. Using D3 v5’s data join, it animates the position and size of each fruit as items are added, removed, or changed in type, with transitions that smoothly adjust the `cx` and `r` attributes. The code uses `d3.range`, `selection.data`, `.enter()`, `.merge()`, and `.exit()` to manage changes, and `d3.scaleOrdinal` to map fruit types to sizes. The dataset is manually manipulated with `setTimeout` calls, simulating an eating and refilling sequence.