{"version":"1.0","type":"rich","title":"Fork of Bowl of Fruit - General Update Pattern Special Cases","description":"This example demonstrates the general update pattern for SVG elements in D3 v5, showing how a bowl of fruit changes as apples are eaten or replaced by lemons. Three distinct update scenarios occur sequentially: removing the last apple, changing an apple’s type to lemon, and filtering out an apple from the middle. The `fruitBowl` function uses D3’s `selectAll` and `.merge` with ordinal scales for color and radius to handle entering, updating, and exiting groups. The underlying code uses `d3.select` and `d3.range` to manage the data array, while SVG `rect` and `circle` elements are re-rendered at each timeout-driven step.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/7479229a0cec45eaae13c10fed977900?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}