{"version":"1.0","type":"rich","title":"Responding to Resize","description":"This example demonstrates how a visualization can automatically respond to changes in the browser window size. It draws a green X spanning the full width and height of the viewport, with thick, semi-transparent strokes. The code uses CSS to make a chart container fill the screen, then relies on the `resize` event listener to trigger a redraw. Within the `redraw` function, D3 v5 selects the container and sets the SVG’s `width` and `height` attributes based on `clientWidth` and `clientHeight`, using a data-driven approach to update the lines’ coordinates.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/1045f316146b44cbbe23dcc370eb6d55?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}