{"version":"1.0","type":"rich","title":"Responding to Resize","description":"This example demonstrates how a D3.js visualization can respond to browser window resizing. A green X is drawn across the full viewport, with its lines recalculated to match the current window dimensions. The code uses the `clientWidth` and `clientHeight` properties of a div container to set the SVG element's width and height attributes. A `redraw` function is invoked on the `resize` event, regenerating the line positions with a data join using `selectAll` and `merge`.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/fadcad53daf44ae7ab5d32208659dd18?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}