{"version":"1.0","type":"rich","title":"Viz Function Concept","description":"This example demonstrates the Viz Function concept, a refactoring that encapsulates configurable logic for graphics and visualization. The main script imports a `viz` function from `./viz` and calls it with parameters for dimensions and an inner rectangle fill color, rendering an SVG with a gray inner rectangle inside the container. The `viz` function uses D3’s `select` and `join` APIs to create and update the SVG rectangle, calculating its size based on provided margins. The code relies on the D3 library (version 7.8.5) and is structured as a reusable, parameterized visualization component.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/554cf32480f54869925e8291c2e8ee88?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}