{"version":"1.0","type":"rich","title":"General Update Pattern","description":"This example demonstrates the D3 general update pattern with React, using a row of fruit shapes that change over time. It shows how data joins handle enter, update, and exit selections as apples are eaten and replaced by lemons. The code uses `selection.data()` with a key function, `.enter()`, `.merge()`, and `.exit()` to manage SVG groups, circles, and text elements. D3’s `scaleOrdinal` maps fruit types to colors and radii, while `setTimeout` triggers state changes to the fruit array.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/b439ca454d404da2868debd6c9a8c0be?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}