{"version":"1.0","type":"rich","title":"Responding to Resize","description":"This example shows how a visualization can adapt to browser window resizing by drawing a green X that spans the full width and height of the available space. The chart container uses CSS to fill the viewport, and a `resize` event listener triggers a `redraw` function that reads `chartDiv.clientWidth` and `clientHeight` to set the SVG’s dimensions. D3 v5’s data join (`selectAll`, `enter`, `merge`) updates the two line elements with new coordinates on every resize. The rendering uses SVG lines with a semi-transparent stroke.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/5e4ec06772d14b9980928072239de852?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}