{"version":"1.0","type":"rich","title":"Responding to Resize","description":"This example demonstrates how a D3 v5 visualization can adapt to browser window resizing by redrawing its SVG content to match the new dimensions. The code uses a CSS-positioned container to fill the viewport, then extracts the container’s `clientWidth` and `clientHeight` during a `redraw()` function. It sets the SVG element’s width and height attributes accordingly and updates a pair of green diagonal lines to form an X spanning the full chart area. A `window` resize event listener triggers the redraw on every size change, showing a minimal pattern for responsive D3 SVGs.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/4a655860b8cf4a439849ed13277e7f6c?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}