{"version":"1.0","type":"rich","title":"Bowl of Fruit - General Update Pattern Special Cases","description":"This example demonstrates the general update pattern in D3, showing how data joins handle adding, removing, and modifying elements in a visualization. A bowl of apples and lemons is rendered as SVG circles that transition between states as fruits are eaten or replaced over timed intervals. The code uses `d3.scaleOrdinal` for color and radius mapping, and calls `fruitBowl` as a reusable function that leverages `selection.enter()`, `selection.merge()`, and `selection.exit()` with `transition.attr` for smooth animations. The data consists of generated fruit objects with random IDs, visualized in a fixed SVG canvas.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/8a28eedd6ba043bb9e92d3a0e8d1aa0f?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}