Bar
Docs · Visuals
Bar chart JSON format.
Vertical bars, one group per category. With several series, bars sit side by side (grouped) or on top of each other (stacked).
Try it
Edit the example and the visual redraws. Mistakes show the same messages the API returns.
The visual
Change any number or label. The chart follows.
Fields
| Field | Type | Rule |
|---|---|---|
orientationRequired | string | Always "vertical". |
modeOptional | string | "grouped" or "stacked". Grouped when left out. |
xKeyRequired | string | The key in each row that holds the category. Up to 80 characters. Must differ from every series key. |
seriesRequired | array | 1 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 have "as": "line" to draw it as a line over the bars; that series may also have "dashed": true and "axis": "right" for a second scale. Keep at least one bar series. For example, revenue bars with a margin line on the right: { "key": "margin", "label": "Margin %", "as": "line", "axis": "right", "dashed": true }, plus the reference { "value": 40, "label": "Target margin", "axis": "right" }. |
dataRequired | array | Up to 500 rows, drawn in the order you list them. |
referencesOptional | array | Up 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. |
| Field | Type | Rule |
|---|---|---|
<xKey>Required | string | The category, such as a month or a branch name. Not empty. Up to 80 characters. |
<series key>Required | number | One 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
{
"orientation": "vertical",
"mode": "stacked",
"xKey": "month",
"series": [
{ "key": "pro", "label": "Pro" },
{ "key": "team", "label": "Team" }
],
"data": [
{ "month": "May", "pro": 4200, "team": 1800 },
{ "month": "Jun", "pro": 4650, "team": 2100 },
{ "month": "Jul", "pro": 5100, "team": 2350 },
{ "month": "Aug", "pro": 5480, "team": 2900 },
{ "month": "Sep", "pro": 6020, "team": 3300 },
{ "month": "Oct", "pro": 6710, "team": 3650 }
]
}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.