{"version":"1.0","type":"rich","title":"Responding to Resize","description":"This example demonstrates a D3.js visualization that dynamically resizes an SVG graphic to match its container’s dimensions. The page’s CSS fixes the chart div to fill the viewport, and the `redraw` function reads `clientWidth` and `clientHeight` to update the SVG’s width and height attributes. It then draws two green, semi-transparent diagonal lines forming an X, whose endpoints are recalculated on every resize. The code uses the browser’s `resize` event listener to invoke `redraw`, alongside D3’s data join for efficient line updates.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/fde834536e7440239eddcc227744f62e?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}