Responding to Resize
This example demonstrates a D3.js v5 visualization that dynamically resizes an SVG to match the browser window. The page uses a fixed-position container to fill the viewport, and a `redraw` function reads the container’s `clientWidth` and `clientHeight` to update the SVG’s dimensions. It draws an X composed of two green lines with 100-pixel stroke width and 0.5 opacity, using a data join with `selectAll`, `enter`, and `merge`. A `window` resize event listener triggers `redraw` each time the window size changes.