{"version":"1.0","type":"rich","title":"Responding to Resize","description":"This example demonstrates a D3.js visualization that automatically redraws itself to match the browser window’s current dimensions. It uses CSS to make a chart container fill the viewport, then reads the container’s `clientWidth` and `clientHeight` properties to size an SVG element accordingly. The visualization draws two thick, semi-transparent green lines forming an X, with coordinates recomputed on every window resize event via a `redraw` function. The code relies on the D3 v5 selection API, `d3.select`, and the `selectAll`/`enter`/`merge` methods to update the SVG lines.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/e84f3ca5f5dc49d69e0dd046ff9cde05?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}