{"version":"1.0","type":"rich","title":"Responding to Resize","description":"This example demonstrates how a D3.js visualization can adapt to browser window resizing. A full-page SVG displays a green X composed of two thick lines that stretch to match the container’s current dimensions. The code uses a `redraw` function to read `clientWidth` and `clientHeight` from the chart’s `div`, then updates the SVG’s width and height attributes and the line coordinates via a data join. A native `window` `resize` event listener triggers a redraw whenever the viewport changes.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/c6349fb610d44692bf1f64be6dcccd71?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}