{"version":"1.0","type":"rich","title":"Responding to Resize","description":"This example demonstrates how a D3.js visualization can adapt to browser resizing by redrawing an SVG to fill the available viewport. A green, semi-transparent X is rendered across the entire chart area, with its coordinates recalculated on every window resize event. The code uses `d3.select` to manage the SVG element and the native `window.addEventListener(\"resize\")` to trigger the redraw function, which reads the container’s `clientWidth` and `clientHeight` to set the SVG’s dimensions. The data comes from a CSV file, though it is only logged to the console and not visualized here.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/d19206a8217748559ab0232c4b74879c?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}