{"version":"1.0","type":"rich","title":"Responsive Viz Container","description":"A responsive visualization container demonstrates how a D3 chart adapts to its parent element’s changing dimensions. The code uses a `ResizeObserver` to track the container’s width and height, then updates an SVG’s attributes accordingly. On each resize, the D3 selection re-draws an inner rectangle with specified margins and a gray fill, showcasing how layout calculations like `innerWidth` and `innerHeight` respond dynamically to viewport changes. This example highlights the interplay between browser APIs and D3’s data-join pattern for flexible, reactive visualization sizing.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/5737ddd8a905467da667cfb9fe26e2d7?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}