{"version":"1.0","type":"rich","title":"Responding to Resize","description":"This example demonstrates a simple, responsive SVG visualization that adapts to the browser window's size. It draws two thick green lines forming an X across the entire viewport, illustrating how CSS-computed dimensions are used to redraw the graphic on window resizing. The D3 v5 code, using `d3.select`, extracts the container's `clientWidth` and `clientHeight` to update the SVG's `width` and `height` attributes, then repositions the line elements via the `merge` operation. A `window.addEventListener(\"resize\")` handler triggers the `redraw` function whenever the window changes.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/5680ae8029b0433082919b5071abc1be?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}