Bar Chart
Bars over a category axis, horizontal or stacked. The default choice for comparing discrete categories — output per line, downtime by reason, scrap by shift.


Reach for it when you need:
- Downtime reasons this week
- Output per line or per shift
Component name: BarChart · Category: Chart
In the palette: Bars over a category axis — toggle horizontal or stack. Bind data to a named query; click a bar to expose {{point.value}}.
Properties
Any property can be bound to a tag, another component's property, or a query.
| Property | Type | Default | Description |
|---|---|---|---|
data | array | [{"month":"Jan","revenue":120,"target":100},{"month":"Feb","… (truncated) | Array of row objects. Bind to a named query ({{query.MyQuery}}), a tag, or edit inline. Rows map to series via categoryField + seriesFields (auto-derived when empty). |
categoryField | string | "" | Row key for the category/name axis. Empty ⇒ first non-numeric column. |
seriesFields | array | [] | Which columns become series (+ per-series color, and stack/area/renderAs where they apply). Empty ⇒ all numeric columns. |
animation | boolean | true | Enable enter/update animation. |
animationDuration | number | 600 | ms. |
animationEasing | enum | cubicOut | Options: linear · cubicIn · cubicOut · cubicInOut · quadraticOut · elasticOut · bounceOut. |
animationDelay | number | 0 | Per-datum stagger (ms). |
title | object | {"show":true,"text":"","subtext":"","left":"left"} | — |
legend | object | {"show":true,"type":"plain","orient":"horizontal","left":"ce… (truncated) | — |
tooltip | object | {"show":true,"trigger":"axis","axisPointerType":"line"} | — |
colorPalette | string | "" | Comma-separated series colors (e.g. #2563eb, #16a34a). Empty ⇒ theme palette. |
backgroundColor | color | "" | Empty ⇒ transparent/theme. |
xAxis | object | {"show":true,"name":"","type":"category","min":"","max":"","… (truncated) | — |
yAxis | object | {"show":true,"name":"","type":"value","min":"","max":"","spl… (truncated) | — |
grid | object | {"left":8,"right":16,"containLabel":true} | — |
dataZoom | object | {"enabled":false,"type":"inside","start":0,"end":100} | — |
horizontal | boolean | false | — |
stack | boolean | false | — |
enableClick | boolean | true | Fire the Data click event + expose lastClicked. |
lastClicked | object | {} | Output (bind from this): the last-clicked datum — {{ ThisChart.lastClicked.value }}. |
optionOverride | string | "" | Power user: paste a raw JSON object of chart options to deep-merge over the built chart, e.g. {"series":[{"itemStyle":{"color":"#e11"}}]}. Empty = none. |
emptyMessage | string | No data | — |
style | style | {} | Custom CSS properties |
Events
Attach event actions to these in the Event Manager.
| Event | Label | Group | Payload |
|---|---|---|---|
click | Click | Mouse | The DOM event. |
dblclick | Double click | Mouse | The DOM event. |
contextmenu | Right click | Mouse | The DOM event. |
mouseenter | Mouse enter | Mouse | The DOM event. |
mouseleave | Mouse leave | Mouse | The DOM event. |
dataClick | Data click | Chart | The clicked datum, under point. |
dataDblClick | Data double click | Chart | The clicked datum, under point. |
legendSelect | Legend toggle | Chart | The toggled series. |
Right-click behaves differently in the Designer
contextmenu fires your configured actions at runtime only — in LiveView and in preview. On the Designer canvas the right-click is captured to open the Event Manager, so testing it there will not run your actions. Test right-click in preview.