🌍 Public
Viewing a saved revision (read-only)
e8e7224b099c4b8dad3676bf5f3f6ce8
Bowl of Fruit - General Update Pattern
This example demonstrates the general update pattern in D3, showing how circles representing fruit change over time as data is modified. The visualization renders five apples as red circles using `d3.scaleOrdinal` for both color and radius, then removes one fruit after a second and changes another from apple to lemon after two seconds. The code uses D3's data join with `selection.enter`, `selection.merge`, and `selection.exit` to handle updating, entering, and exiting SVG circle elements.
AI-generated description