{"version":"1.0","type":"rich","title":"Enter, Exit, Update (i.e Merge)","description":"This example demonstrates D3’s enter, exit, and update pattern for binding data to SVG rectangles, showing how bars are added, resized, or removed as the dataset changes. The code uses `selection.enter()`, `.merge(selection)`, and `selection.exit().remove()` within a reusable `drawChart` function, and it calls that function twice with different data arrays to illustrate the transitions. It relies on the D3 v5 `select` and `merge` APIs, with SVG rendering in a fixed 960×500 viewport.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/31b13981ee7645388ef307490e8fcd34?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}