{"version":"1.0","type":"rich","title":"Fork of Viz Function Conceptdrb","description":"This example demonstrates a reusable \"viz function\" pattern for structuring D3.js graphics. It renders a simple rectangle with configurable margins, dimensions, and fill color, computed from the container size. The code separates the visualization logic in `viz.js`, which accepts an SVG selection and an options object, while `index.js` initializes the SVG using D3's `select` and `join` methods. This refactoring highlights how to encapsulate and parameterize chart code for flexibility.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/5258e10e325f401c9f11f42ba916f598?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}