{"version":"1.0","type":"rich","title":"Responding to Resize","description":"This example demonstrates a chart that responds to browser resizing by redrawing its content to match the available space. It shows a large green X drawn across the entire viewport, with the SVG dimensions updating dynamically as the window changes. The code uses the D3 v5 library to bind an SVG element to a fixed-position container, then recalculates the width and height from the container's `clientWidth` and `clientHeight` properties on every resize event. A `redraw()` function defines two diagonal lines and updates their endpoints via D3's selection-merging API, while a window listener triggers the redraw.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/84b38c3ddfb04e2782ea80b7b92652b6?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}