{"version":"1.0","type":"rich","title":"Responding to Resize","description":"This example demonstrates how a D3.js visualization can respond dynamically to browser resizing. It uses CSS positioning to make the chart container fill the viewport, then queries its `clientWidth` and `clientHeight` properties on each resize event to update the SVG’s `width` and `height` attributes. The visualization redraws a large green X composed of two SVG `<line>` elements, using the `merge` method for efficient updates. The code relies on the `window.addEventListener(\"resize\", redraw)` API to trigger the redraw function whenever the window dimensions change.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/43f416cc367b4c46950ed0cd7ed87fc0?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}