Enter, Exit, Update (i.e Merge)
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.