{"version":"1.0","type":"rich","title":"Fork of Responding to Resize","description":"This example demonstrates how a D3.js visualization can automatically respond to browser window resizing. It draws two thick blue diagonal lines—an X shape—across a full-screen SVG element. The code uses CSS positioning to make the chart container fill the viewport, then extracts the container’s `clientWidth` and `clientHeight` properties within a `redraw` function. This function sets the SVG’s dimensions and updates the line coordinates accordingly. The visualization listens for window resize events and calls `redraw` each time, ensuring the X always spans the entire display area. The data for the lines is defined as an array of coordinate pairs.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/d82fa7b148ea42a4a408bd0da0ddd8c3?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}