szum

Sizing

Control image dimensions, plot area, margins, and output format.

Two sizing modes, auto margins, and two output formats. Use outer sizing when you need a fixed image size (emails, cards). Use plot sizing when the data area must be exact (dashboards, print).

Outer sizing (default)

width and height set the total image dimensions. The plot area is what remains after margins, title, axes, and legend:

Defaults: 640 × 400 pixels.

Wide vs narrow

The same data at different widths – the plot area stretches to fill:

Plot sizing

plotWidth and plotHeight control the data area directly. The total image grows to accommodate margins and chrome:

You cannot mix the two modes – specifying both width and plotWidth is a validation error.

Margins

Margins auto-expand to fit axis labels, tick labels, title, subtitle, and legend. Override them when you need precise control:

Any omitted side keeps its auto-computed value.

Output format

FieldTypeDefaultDescription
format"svg" | "png""svg"Output image format.
scale142Pixel ratio. Higher values produce sharper PNGs on retina displays.

SVG is scalable and smaller – use it for web embeds. PNG is raster – use it when you need a bitmap (emails, Slack, legacy systems).

On this page