{"version":"1.0","type":"rich","title":"Responding to Resize","description":"This example demonstrates how a D3.js visualization can respond to browser window resizing. It draws a green X composed of two thick, semi-transparent lines that stretch across the entire viewport, with the SVG element filling the page via CSS fixed positioning. The code uses `chartDiv.clientWidth` and `clientHeight` to extract the computed CSS size, then applies those dimensions to the SVG’s width and height attributes. A `redraw` function manages the SVG and line updates, and a window `resize` event listener triggers it whenever the viewport changes.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/d8a77c315d05456296b876e91079b703?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}