{"version":"1.0","type":"rich","title":"Responding to Resize","description":"This example demonstrates a responsive D3.js visualization that adapts automatically when the browser window is resized. It shows a large green X drawn across an SVG canvas that fills the entire viewport. The code uses the `clientWidth` and `clientHeight` properties of the chart container to measure the CSS-computed dimensions, then applies those values to the SVG via `attr(\"width\")` and `attr(\"height\")`. A `redraw` function, triggered by a `resize` event listener, re-renders the X marks to match the updated size.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/dec6f72222ed4dc7b80f880064bc942c?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}