POST
/
v1
/
workbooks
/
{id}
/
chart
import Grid from '@grid-is/api';

const client = new Grid();

async function main() {
  const response = await client.workbooks.renderChart('id', { chart: { data: '=C2:C142' } });

  console.log(response);

  const content = await response.blob();
  console.log(content);
}

main();
This response does not have an example.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Body

application/json

Options for rendering a chart from workbook data.

chart
object
required

Options for rendering a chart from workbook data. Specify the data range, chart type, image output format, and title and axis labels.

apply
object[] | null

Cells to update before rendering the chart. Changes are discarded at the end of the request

Specifies a temporary change to a workbook cell, including the target cell reference and the value to apply. The API has no state, and so any changes made are cleared after each request.

Example:
[{ "target": "A2", "value": 1234 }]

Response

200
image/png
Chart rendered as an image

The response is of type file.