Output Charts

Docs · Visuals

Line chart JSON format.

One line per series across your categories, usually time.

Try it

Edit the example and the visual redraws. Mistakes show the same messages the API returns.

The visual
Line

Change any number or label. The chart follows.

Fields

The line document
FieldTypeRule
curveOptionalstring"linear", "monotone" (smooth) or "step".
xKeyRequiredstringThe key in each row that holds the category. Up to 80 characters. Must differ from every series key.
seriesRequiredarray1 to 6 entries, each { "key": string, "label": string }. key names a number field in every row; label is what the legend shows and is optional. Up to 80 characters each. A series may also have "dashed": true, as in { "key": "plan", "label": "Plan", "dashed": true }. A series may have "axis": "right" for a second scale; keep at least one on the left.
dataRequiredarrayUp to 500 rows, drawn in the order you list them.
referencesOptionalarrayUp to 6 items. { "value": 100, "label": "Budget" } draws a flat line at that number; { "at": "Mar", "label": "Launch" } draws a marker at that category, and is skipped while no row has it. On a line or bar chart with a series on the right axis, a value reference may take "axis": "right" to sit on that scale. label is optional, Up to 80 characters.
Each row in data
FieldTypeRule
<xKey>RequiredstringThe category, such as a month or a branch name. Not empty. Up to 80 characters.
<series key>RequirednumberOne number for every series key.

Good to know

  • A row may hold only the xKey and the series keys. Any other key is an Unknown field error, so drop extra columns before you send.
  • Category values are strings. Send dates as text, such as "2026-10" or "Oct 18".

Example

{
  "xKey": "day",
  "curve": "monotone",
  "series": [
    { "key": "signups", "label": "Signups" }
  ],
  "data": [
    { "day": "Mon", "signups": 31 },
    { "day": "Tue", "signups": 42 },
    { "day": "Wed", "signups": 38 },
    { "day": "Thu", "signups": 55 },
    { "day": "Fri", "signups": 49 },
    { "day": "Sat", "signups": 61 },
    { "day": "Sun", "signups": 72 }
  ]
}

Send it from your code

Paste the document in the editor, or replace it with a PUT to the visual's push URL. The push API page has the details and examples.

Next: Area chart JSON format