{"version":"1.0","type":"rich","title":"Bowl of Fruit - General Update Pattern","description":"This example demonstrates D3’s general update pattern for binding data to SVG circles, showing how entering, updating, and exiting elements transition smoothly as fruit data changes over time. A bowl of apples shrinks as fruits are removed, one apple changes into a lemon, and another apple is filtered out, with each state change animated via `transition().duration()`. The code uses `scaleOrdinal` for color and radius mappings, `selection.data()` with a key function on fruit IDs, and explicit `.enter()`, `.merge()`, and `.exit()` chains to manage the circle lifecycle. Rendering targets SVG, driven by `d3.select` and `range` in a vanilla JavaScript setup.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/25b5d22a334e4aaba12bad55899887fe?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}