{"version":"1.0","type":"rich","title":"Responding to Resize","description":"This example demonstrates a full-page SVG visualization that responds to browser resizing by redrawing a large green X spanning the chart’s diagonal corners. The code uses a fixed-position div container with CSS to compute available space, then extracts its `clientWidth` and `clientHeight` inside a `redraw()` function. That function updates the SVG’s `width` and `height` attributes and binds two line data points to draw the X. A `window.addEventListener(\"resize\", redraw)` triggers the redraw on every window size change, while d3.v5 manages SVG element selection and data joins.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/35ba7edb4a4f4e448b23b6a17aa8f8d6?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}