{"version":"1.0","type":"rich","title":"Bowl of Fruit - General Update Pattern Special Cases","description":"This example demonstrates the general update pattern in D3, showing how data joins handle adding, removing, and modifying elements. A bowl of five apples is rendered as SVG circles and text labels; one apple is eaten, another turns into a lemon, and a third is removed. The code uses `selection.selectAll`, `selection.enter`, `selection.merge`, and `selection.exit` to manage the transitions. It relies on `d3.scaleOrdinal` for color and radius mappings, and `d3.select` to target the SVG container.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/899f6b764eed43d191a03e2f4390d680?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}