{"version":"1.0","type":"rich","title":"Fork ","description":"A responsive visualization container uses a ResizeObserver to track the container’s dimensions and updates the state with the new width and height. The d3-selected SVG element re-renders an inner rectangle on each resize, with its fill, margins, and size defined by the viz function. This example demonstrates a pattern for making D3 visualizations adapt to their parent element’s size changes, using the ResizeObserver API and D3’s join method to manage the SVG and rectangle elements dynamically.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/0526b62a99e34c588572c2efb2c12d64?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}