{"version":"1.0","type":"rich","title":"Fork of Responding to Resize","description":"This example demonstrates how a D3.js visualization can automatically resize its SVG output to match the browser window’s dimensions. The code uses CSS to make a container div fill the viewport, then reads `clientWidth` and `clientHeight` to set the SVG’s width and height attributes. It draws an X shape using two green lines with heavy stroke width and opacity, showing the current size. The `redraw` function reapplies these dimensions whenever the window is resized by listening to the `resize` event.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/4102fddfe3894f69b99637ca3f12be0d?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}