{"version":"1.0","type":"rich","title":"Responding to Resize","description":"This example demonstrates how to make a visualization respond to browser resizing by redrawing SVG content to match the container’s current dimensions. The code uses D3 v5 to create a blue X composed of two `<line>` elements, whose coordinates are recomputed whenever the window fires a resize event. It reads the computed width and height from the chart `<div>` using `clientWidth` and `clientHeight`, then updates the SVG’s `width` and `height` attributes accordingly. The rendering relies on standard D3 data joins and attribute setters.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/65bf063f003a4af588fe309071ff2e5d?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}