v15

latestOpenAPI 3.1.0raw.githubusercontent.com2025-11-11104961.0 KB
workbooks

Render a chart using workbook data

post/v1/workbooks/{id}/chart

Path parameters

idstring required

Request body

widthinteger nullable

Width of the chart image in pixels. If not given, a width of 764px is used. A chart's height cannot be set explicitly because it will differ depending upon chart type, title, legend, axis labels, and so on.

mattestring nullable

Hex color code for the chart's background matte, e.g. '#FFFFFF' for white, if not specified, the chart will have a transparent background. Note, this is currently only supported for PNG images.

Example request

{
  "apply": [
    {
      "target": "A2",
      "value": 1234
    }
  ],
  "chart": {
    "data": "=C2:C142",
    "dataLines": "=C2:C142",
    "numberFormat": "#,##0.0",
    "labels": "=B2:B142",
    "legend": "=D2:D142",
    "legendLines": "=E2:E142",
    "title": "=A1",
    "subtitle": "=B4",
    "footnote": "=H13",
    "chartColors": "={\"#C40\";\"#03F\"}",
    "axisValue": {
      "title": "=C4",
      "numberFormat": "#,##0.0"
    },
    "axisDim": {
      "title": "=C4",
      "numberFormat": "#,##0.0"
    }
  },
  "matte": "#FFFFFF"
}

Response

Chart rendered as an image