{"version":"1.0","type":"rich","title":"Responding to Resize","description":"This example demonstrates how an SVG visualization can dynamically respond to browser resizing. It shows a green X drawn inside a chart container that automatically adjusts its dimensions to match the container’s current width and height. The code uses D3 v5 to append and update line elements, reading the container’s `clientWidth` and `clientHeight` within a `redraw` function triggered by a window resize listener. A separate `setsvgsize` function also resizes an additional SVG element based on window dimensions, illustrating two approaches to size management.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/6a3754a2bef841868ff72dbdca91d533?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}