{"version":"1.0","type":"rich","title":"Responding to Resize","description":"This example demonstrates how a D3.js visualization can respond dynamically to browser resizing. A full-screen SVG element displays a large green X composed of two diagonal lines, with the chart container styled to fill the viewport using fixed CSS positioning. The `redraw()` function extracts the container’s current dimensions via `clientWidth` and `clientHeight`, then updates the SVG’s width and height attributes and adjusts the line coordinates accordingly. A window `resize` event listener triggers a redraw on every size change, ensuring the graphic always fits the available space.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/40bfcd391e0843d9b3581802ef3c8daf?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}