{"version":"1.0","type":"rich","title":"Responding to Resize","description":"This example demonstrates how a visualization can adapt to browser window resizing by drawing a green X that fills the entire viewport. The chart container is styled with CSS to occupy the full page, and a `resize` event listener triggers the `redraw` function whenever the window dimensions change. The function retrieves the computed `clientWidth` and `clientHeight` from the container, sets those values on the SVG element, and updates the line positions accordingly. The code uses D3 v5 selections with `merge` to update the two diagonal lines efficiently.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/b5a8382d21e740cfb83498305f70937b?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}