Horizontal bar
Docs · Visuals
Horizontal bar chart JSON format.
The same bars, drawn sideways. Long category names read better this way.
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 "horizontal". |
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. |
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": "horizontal",
"mode": "grouped",
"xKey": "team",
"series": [
{ "key": "spend", "label": "Spend" }
],
"data": [
{ "team": "Marketing", "spend": 18400 },
{ "team": "Sales", "spend": 12900 },
{ "team": "Support", "spend": 7600 },
{ "team": "Product", "spend": 9800 }
]
}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: Line chart JSON format