{"version":"1.0","type":"rich","title":"Responding to Resize","description":"This example demonstrates a chart that responds to browser window resizing by redrawing an SVG to match the container’s current dimensions. On each resize event, the code reads the div’s `clientWidth` and `clientHeight` properties, then updates the SVG element’s `width` and `height` attributes via D3 v5 selections. It draws two intersecting green lines, forming an X, with thick semi-transparent strokes to visually confirm the resized coordinate system. The rendering approach uses D3’s data join with `enter()` and `merge()`, plus a CSS fixed-position container to fill the viewport.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/92bc071d5d4c415a9363ef94813adccc?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}