Images

Data to chart image (bar, line, pie, doughnut, radar)

Turns labels and numeric series into a chart image, without a browser. Pie and doughnut accept 1 series only.

Costs 1 credit per call.

post/chart

Request

  • Base URL: https://api.cofferdock.com
  • URL: https://api.cofferdock.com/chart
  • Auth: API key in header x-api-key

Request body

type'bar' | 'line' | 'pie' | 'doughnut' | 'radar' required

Chart type: "bar", "line", "pie", "doughnut" or "radar".

labelsstring[] required

Category names, 1 to 50 strings of up to 100 characters each: the x axis for bar and line charts, the slices for pie and doughnut, the axes for radar.

titlestring

Optional title shown above the chart.

widthinteger

Chart width in pixels (200-2000). Default 800.

heightinteger

Chart height in pixels (200-2000). Default 500.

format'png' | 'svg'

Image format: "png" (default) or "svg".

output'json' | 'binary' | 'url' | 'image'

How to return the image: "json" (base64 in the JSON response), "binary" (the image itself, ready for n8n/Make/Zapier) or "url" (a temporary download link, valid 15 minutes). Default: json when the request is JSON, binary when the input was sent raw.

Response

The resulting image (shape depends on output).

OR

Changes

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