🌍 Public
Viewing a saved revision (read-only)
15c91bb1860747f3b2091934e0b9d87f
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