{"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 to handle data joins when adding, removing, and modifying elements. It uses `d3.scaleOrdinal` for color and radius mapping, with SVG circles and text rendered inside groups. The code creates five apples, then removes one, replaces one with a lemon, and filters out another, animating each change via `setTimeout` and re-rendering with `selection.merge`. The bowl is drawn as a rounded rectangle, and fruit types are color-coded through the ordinal scale.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/22ea6aabfb6249f593d35c7eb20049ea?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}