{"version":"1.0","type":"rich","title":"Fork of Margins","description":"This example demonstrates how margins define the inner rectangle of a visualization, using a red rectangle to clearly show the area where data marks are drawn. The code sets fixed margin values for the top, bottom, left, and right, then calculates the inner dimensions by subtracting them from the container's width and height. It uses D3's `select` API with a `join` operation to create and size the SVG and its child rectangle, illustrating the fundamental layout step before adding axes or data.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/1ffb3bb70cd84b70905d8143b07166a2?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}