{"version":"1.0","type":"rich","title":"Bowl of Fruit - General Update Pattern Special Cases","description":"This example demonstrates the \"general update pattern\" in D3.js, showing how a data visualization animates changes to a dataset of apples and lemons over time. It displays a bowl of fruit, where each fruit is a circle with a type-specific color and radius, and items are added, removed, or modified as the simulation progresses. The code uses D3's selectors and transition methods, including `selection.selectAll`, `.merge()`, and `.transition().duration()`, to smoothly animate enter, update, and exit states. The visualization is rendered as SVG with animations triggered by `setTimeout` calls, which alter the fruit array and re-render the scene.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/686eb1a117c04d05bcccab81d0557a72?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}