🌍 Public
Viewing a saved revision (read-only)
11a610671f76420fa9f00fbc2249d3f2
Margins
This example demonstrates how margins frame a visualization’s drawing area. A single gray rectangle sits inside an SVG canvas, inset by a uniform 22-pixel margin on all sides. The code uses D3’s `select` to create the SVG and computes the inner dimensions by subtracting the margin from the container’s size. The rectangle is rendered with `attr` for positioning and fill, showing the reserved space around the plot region.
AI-generated description