{"version":"1.0","type":"rich","title":"Responding to Resize","description":"This example demonstrates how a D3.js visualization can respond to browser resizing by redrawing its content to match the new dimensions. The page uses a CSS-styled container and a redraw function that reads `clientWidth` and `clientHeight` to set the SVG’s `width` and `height` attributes. It draws two green lines forming an X across the full viewport, with strokes updated on each resize event. The code uses D3 v5 with `d3.select`, `svg.attr`, and `window.addEventListener` to handle the dynamic resizing.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/10ad7278e5834de9857b2c573d00a9e5?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}