Sizing and output

Keep chart meaning independent from size and output policy.

Sizing belongs to size, beside config and data, so where a chart is delivered never changes what it means.

Automatic sizing

Omit size for automatic sizing, which adapts to the chart type and category count. After choosing the outer size, Szum measures the title, subtitle, axes, legends, labels, caption, and attribution before sizing the plot. It never drops source data to make a chart fit.

Auto grows up to 4096 logical pixels in either dimension. Past that, the complete dataset is laid out inside the bounded canvas, with the usual label placement and collision rules; more categories never produce an error. Figma’s smaller preview reflows independently of the inserted size.

Auto is the best starting point for API renders, MCP previews, examples, and first insertion into Figma.

Fixed canvas

{ "size": { "type": "canvas", "width": 720, "height": 480 } }

Canvas dimensions describe the complete output. Chart chrome and plot share that space. Use this for email slots, social cards, report figures, and other destinations with a fixed outer box.

Canvas sizing keeps the requested outer dimensions. A very small canvas can squeeze the plot or truncate fitted text, so check the smallest real destination. Source rows are never dropped to make it fit.

Fixed plot

{
  "size": {
    "type": "plot",
    "width": 560,
    "height": 320,
    "margin": { "left": 16, "right": 24 }
  }
}

Plot dimensions describe the data area. Titles, axes, legends, labels, caption, and attribution grow around it. Use plot sizing when the data region must remain comparable across charts with different labels or chrome.

Optional margin sets the outer padding on each side you provide; measured titles, axes, and labels still fit inside it. Canvas sizing takes no margins, because the canvas already fixes the whole output.

Wide and narrow destinations

A wide chart can carry more time points, horizontal labels, and direct series labels. A narrow chart needs fewer competing labels and may benefit from a bar orientation or visible legend instead of line-end labels.

Interactive embeds fill their container and re-run responsive layout from the same document. PNG and SVG use the authored or derived size. Test both the smallest and largest real destination rather than assuming one aspect ratio works everywhere.

Output format

Output policy is separate from size:

{ "output": { "format": "png", "scale": 2 } }
  • SVG is vector output and remains sharp at any display density.
  • PNG rasterizes the resolved size. scale accepts 1, 2, 3, or 4, defaults to 2 when omitted, and changes pixel resolution without changing authored layout dimensions.

Omit output for SVG. A saved document keeps its output preference; a render request can choose one for that render.

SVG responses include a viewBox, so they can scale proportionally through CSS or an image width without distorting the authored layout. Leave the display height automatic when preserving that aspect ratio.

Attribution credit

Attribution is plan policy, not chart config. Anonymous and Free hosted output carries the Szum credit; Creator, Pro, and Team output does not. When the credit is required, Szum reserves space for it so it never overlaps the plot.

Editor previews and Figma insertions never carry the credit. Saved charts stay live after a downgrade; their delivery follows the current plan without rewriting the stored document.

Where sizing applies

  • POST /chart, GET /chart, and MCP previews render the request size.
  • Saved image URLs render the size stored in the published document.
  • Figma inserts the rendered frame, then uses the resized Figma frame for subsequent edits.
  • Interactive embeds use the stored document but respond to their live container.
  • Studio and docs previews are produced locally and do not consume hosted render quota.

Width and height must be integers from 1 to 4096. A PNG request can still be rejected when its scaled pixel area is too large, even with valid dimensions.

On this page