Export

Export a chart as an image

Rasterises a client-supplied SVG chart to PNG (or returns watermarked SVG if no rasteriser is installed). The incoming SVG is scrubbed first; anything unsafe (scripts, external references, event handlers) is rejected with 400.

The watermark is decided server-side by the caller's tier — free-tier exports always carry the StackData mark and the client cannot opt out.

post/v1/export

Request

  • Base URL: https://api.stackdata.io
  • URL: https://api.stackdata.io/v1/export
  • Auth: one of:
    • none
    • API key in header X-API-Key

Request body

svgstring required

The chart as an SVG string, with colours inlined.

titlestring

Title rendered above the chart.

themeobject

Optional theme tokens (background, ink, …).

Response

The image. PNG when a rasteriser is available, otherwise watermarked SVG.

Changes

No recorded changes to this operation across all 1 revision of this API.