{"version":"1.0","type":"rich","title":"Responding to Resize","description":"This example demonstrates how a visualization can dynamically respond to browser window resizing. It uses the CSS `clientWidth` and `clientHeight` properties to extract the current container size and applies these dimensions to an SVG element via the `attr` method. Two diagonal lines are drawn across the SVG to visually confirm the correct sizing, with a resize event listener triggering a full redraw. The code relies on D3 v5’s selection and data join patterns to update the line coordinates.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/dd44f8fcdc8346ff90bddd63572bf638?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}