{"version":"1.0","type":"rich","title":"Bowl of Fruit - General Update Pattern Special Cases","description":"This example demonstrates the general update pattern in D3, handling special cases when a data array changes through add, remove, and mutation operations. A row of apples rendered as SVG circles is modified over time: one apple is eaten, another becomes a lemon, and a middle apple disappears. The code uses D3’s `selectAll` with data joins, `.enter()`, `.merge()`, and `.exit()` to manage entering, updating, and exiting elements. The `fruitBowl` function uses scaleOrdinal to map fruit types to colors and radii, with circles and text labels positioned by index.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/7f4137a77b564607ae2791ab1e49cf7e?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}