Responding to Resize
This example demonstrates a full-page SVG visualization that responds to browser resizing by redrawing a large green X spanning the chart’s diagonal corners. The code uses a fixed-position div container with CSS to compute available space, then extracts its `clientWidth` and `clientHeight` inside a `redraw()` function. That function updates the SVG’s `width` and `height` attributes and binds two line data points to draw the X. A `window.addEventListener("resize", redraw)` triggers the redraw on every window size change, while d3.v5 manages SVG element selection and data joins.