{"version":"1.0","type":"rich","title":"Fork of Responding to Resize","description":"This example demonstrates a full-window SVG that redraws an X shape whenever the browser viewport changes size. It uses a CSS-fixed `#chart` container to compute the available width and height via `clientWidth` and `clientHeight`, then updates the SVG’s `width` and `height` attributes inside a `redraw()` function. The code attaches a `window` `resize` event listener to call `redraw()` continuously, ensuring the two thick green lines always span the new dimensions. Built with D3 v5, it selects elements with `d3.select` and uses the `merge` method to update the line positions.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/6ace69df2e644476ab45da785c89587e?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}