{"version":"1.0","type":"rich","title":"Fork of Responding to Resize","description":"This example demonstrates a full-page SVG that redraws itself whenever the browser window is resized, using a green X spanning the chart’s diagonal as a visual test of the updated dimensions. The code extracts the CSS-computed `clientWidth` and `clientHeight` from the container `<div>`, then sets the SVG’s `width` and `height` attributes accordingly. It uses d3 v5’s data join (`selectAll`, `enter`, `merge`) to update two `<line>` elements, and registers a `resize` event listener on `window` to call the `redraw` function on every size change.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/70a8cea51ec441098dfd7042117028a7?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}