{"version":"1.0","type":"rich","title":"d3 Starter Bowl of Fruit - General Update Pattern","description":"This example demonstrates the \"general update pattern\" in D3.js v5 by rendering a static bowl of fruit—a set of apples and a lemon—as SVG shapes. The visualization dynamically updates the fruit bowl through a series of timed events, removing apples, replacing one with a lemon, and filtering out another, using the `selectAll`, `enter`, `merge`, and `exit` methods (e.g., `selection.selectAll('g').data(fruits)`, `groups.enter().append('g')`) to handle element creation, updating, and removal. The code uses D3's `scaleOrdinal` for color and radius mapping, with the SVG rendered directly as `rect`, `circle`, and `text` elements. Data is generated via `range(5)` and `makeFruit` functions, reacting to `setTimeout` callbacks that call `render()`.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/be464005049948e893037f5d03110871?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}