Bowl of Fruit - General Update Pattern
✓ Published2🌍 Public
This example demonstrates the D3 general update pattern by rendering a bowl of fruit as SVG circles that change over time. Using `d3.scaleOrdinal` for color and radius mapping, the `fruitBowl` function joins data to circle elements, handling enter, update, and exit selections with `.enter()`, `.merge()`, and `.exit().remove()`. Apples and lemons are distinguished by type, and timed interactions remove fruits or replace an apple with a lemon, showing how the visualization synchronizes DOM elements with changing data.
AI-generated descriptionMIT Licensed