Skip to content

BarChart

Charts

Compare categories. data [{x,y,series?}]; series grouped side by side, or stacked:true. horizontal for long labels.

Props

Generated from the Zod definition. In A2UI 1.0 any value may also be a { "@path" } binding into the surface data model or a { "@call" } function call.

PropTypeRequiredDescription
titlestringNoHeading shown at the top of the component.
subtitlestringNoSecondary line under the title.
heightnumberNoHeight in pixels.
format"number" | "currency" | "percent" | "compact"NoNumber formatting for values and axes.
unitstringNoUnit appended to values (for example km or °C).
data{ x, y, series? }[]YesRows to plot or list; usually bound to a data-model path.
stackedbooleanNoStack series instead of grouping them side by side.
horizontalbooleanNoLay bars out horizontally for long labels.
highlightstringNo-

Used by templates

Fixed-schema templates that include BarChart. Try them in the playground.