{"version":"1.0","type":"rich","title":"Responding to Resize","description":"This example demonstrates how a D3.js v5 visualization can respond dynamically to browser window resizing. It uses a full-screen chart container and redraws an SVG element to match the container’s current pixel dimensions, displaying a green X composed of two thick lines. The code leverages `d3.select`, `svg.attr`, and a window `resize` event listener to update the drawing. The visualization extracts dimensions via `clientWidth` and `clientHeight`, ensuring the SVG scales proportionally with the viewport.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/ccda06b2f5f8494e8969441affae8834?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}