{"version":"1.0","type":"rich","title":"Responding to Resize","description":"This example demonstrates how a D3.js visualization can respond to browser resizing by redrawing an SVG to fill the viewport. A green X-shaped pair of lines is rendered with thick, semi-transparent strokes, and its dimensions update dynamically whenever the window size changes. The code uses a container `<div>` with CSS `position: fixed` to occupy the full page, then extracts `clientWidth` and `clientHeight` during a `redraw` function. It sets the SVG's `width` and `height` attributes accordingly and rebinds line coordinates via `selectAll` and `merge`, with a `resize` event listener triggering updates.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/2f429466156f4cafb3ca868ec34b53f2?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}