{"version":"1.0","type":"rich","title":"Bowl of Fruit - Nested Version of General Upate Pattern","description":"This example demonstrates the general update pattern in D3.js, showing how data joins handle entering, updating, and exiting elements. A bowl of fruit (rendered as circles) initially contains five apples; over time, fruits are removed, a lemon replaces an apple, and a specific fruit is filtered out. Using `selection.enter()`, `selection.merge()`, and `selection.exit()`, the nested SVG groups update their positions and styles via ordinal scales for color and radius. The code relies on D3 v5’s `scaleOrdinal` and manual timeouts to trigger state changes, with SVG rendering for all visual elements.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/82235a66e61e4844884ae144bf6ad9a8?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}