Margins
✓ Published2🌍 Public
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 descriptionD3 Margins
MIT Licensed