{"version":"1.0","type":"rich","title":"Responding to Resize","description":"This example demonstrates how a D3.js SVG visualization can adapt to browser window resizing, drawing a green X composed of two thick lines that span the full width and height of the container. It shows the size extraction and redrawing process in action. The code uses a `redraw` function that reads the dynamic `clientWidth` and `clientHeight` properties of the chart’s div, then updates the SVG’s `width` and `height` attributes accordingly via D3 selections and merges. A native `window.addEventListener(\"resize\", redraw)` triggers the redraw on every viewport change, while CSS fixed positioning ensures the container fills the page.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/760c5074edbf45c78447194af0045092?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}