{"version":"1.0","type":"rich","title":"Bowl of Fruit - General Update Pattern Special Cases","description":"A bowl of fruit demonstrates D3's general update pattern with special cases for enter, update, and exit selections. The code uses `d3.scaleOrdinal` to map fruit types to colors and radii, while `selection.data` with a key function tracks fruit identities across transitions. As apples are eaten, replaced with lemons, or removed, `transition.attr` animates circle radii and fill colors, with exiting elements shrinking and turning blue before removal. The example renders SVG with animated transitions in d3.v5, using `selection.merge` to handle entering and updating elements uniformly.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/8bb8278e076545d5bb41ec0fd9fea17d?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}