{"version":"1.0","type":"rich","title":"Bowl of Fruit - General Update Pattern Special Cases","description":"This example demonstrates the general update pattern in D3 with special cases, showing a bowl of fruit that changes over time as apples are eaten and replaced with lemons. The visualization uses D3 v5’s data joins (`selection.data`, `.enter`, `.exit`) to manage SVG circles and text elements, with `scaleOrdinal` mapping fruit types to colors and radii. A rect represents the bowl, and each fruit’s position is computed via index-based translations. The code sequences updates using `setTimeout`, illustrating how enter, update, and exit selections handle modifications to the data array.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/2bf7bd7fb40d429391e0760e735ac53d?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}