{"version":"1.0","type":"rich","title":"Responding to Resize","description":"This example demonstrates how a D3.js visualization can dynamically respond to browser resizing events. The chart container fills the viewport using CSS positioning, and a redraw function retrieves the computed `clientWidth` and `clientHeight` to update the SVG element’s dimensions. Two diagonal lines are drawn from corner to corner to visually confirm the current size. The code uses the `resize` window event listener and D3 v5’s `.selectAll`, `.merge`, and `.attr` methods, though the initial call to `redraw()` is commented out.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/2703e0436c144ef9ad583f01594f23da?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}