{"version":"1.0","type":"rich","title":"Responding to Resize","description":"This example demonstrates how a D3.js v5 visualization can dynamically respond to browser resizing. It draws two thick green lines forming an X shape that always spans the full width and height of the chart container. The code uses CSS positioning to fill the viewport, then extracts the container’s `clientWidth` and `clientHeight` in a `redraw` function to update the SVG’s dimensions. A window `resize` event listener triggers `redraw`, which rebinds and updates the line elements through D3’s data join pattern.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/ac53b3886b004a8a8b0fc836b74e4def?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}