{"version":"1.0","type":"rich","title":"Fork of Responding to Resize","description":"This example demonstrates how a D3.js visualization can respond to browser resizing by redrawing an SVG element to fill the available screen space. It uses `d3.select` to append an SVG to a fixed-position div, then defines a `redraw` function that reads the container’s `clientWidth` and `clientHeight` to set the SVG’s dimensions. The visualization draws two diagonal lines forming a green X, with stroke opacity set via D3’s attribute and style methods. A `window.addEventListener(\"resize\", redraw)` handler triggers the redraw on every viewport change.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/4d88fef99d914c0180e90f2344284e6c?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}