{"version":"1.0","type":"rich","title":"Responding to Resize","description":"This example demonstrates how a visualization can dynamically respond to browser window resizing. It shows a green X shape that stretches and scales to fill the entire viewport, using an SVG canvas. The code uses CSS to size a chart container and then extracts its computed dimensions via `clientWidth` and `clientHeight`. A `redraw` function updates the SVG’s width and height attributes and redraws two intersecting lines. A window `resize` event listener triggers this function, ensuring the graphic always matches the current viewport size. It uses D3.js v5 for SVG element creation and manipulation.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/f22cf5e9e8cb4dd1a623388b08fb978e?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}