{"version":"1.0","type":"rich","title":"Bowl of Fruit - General Update Pattern","description":"A bowl of fruit demonstrates D3’s general update pattern for smoothly adding, removing, and modifying SVG elements. Five apples initially appear in a rounded rectangle; over time, one apple disappears, a second is replaced by a lemon, and a third is removed. The `fruitBowl` function uses `selection.data`, `enter`, `merge`, and `exit` to bind fruit objects to groups, updating circle colors and radii via `d3.scaleOrdinal`, with text labels. D3 v7 handles the data joins, while `setTimeout` triggers re-renders.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/cbf3c68915344ab7a1e4bd40a575bd88?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}