{"version":"1.0","type":"rich","title":"General Update Pattern","description":"The example code demonstrates the general update pattern for dynamic data in D3.js, where elements are added, removed, and modified in a live visualization. It shows a collection of circles representing apples and lemons, which are inserted, deleted, and changed in place over time. The implementation uses `selection.selectAll`, `.enter()`, `.merge()`, and `.exit()` to manage the lifecycle of SVG circle elements. It leverages D3's `scaleOrdinal` for color and radius mapping, and applies animated transitions with a 1000-millisecond duration via `.transition()`. The data is generated randomly using `range` and `Math.random()`.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/ddf7a0f5a854442ba67bbfc9cb496f7e?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}