categories | readonly ChartText[] | — | Category labels, given once. Every series has one value per category. A label is never cut with an ellipsis: one
that does not fit its band wraps inside it, and a band too narrow to wrap in thins labels, ending on the last
category. The full text is always the tooltip title. |
label | LocalizedMessage | — | Accessible name of the chart. It names the plot and captions the data table that assistive technology reads. The
chart paints no heading; render one beside it if the screen needs one. |
series | readonly BarChartSeries[] | — | The bars, in the order callbacks report as datasetIndex. With several series the bars of a category sit side by
side, or end to end with stack. |
beginAtZero | boolean | — | Includes zero on the value axis. Defaults to true. |
className | string | — | Classes appended after the generated classes. Design-system use only: pnpm lint:classname rejects it in apps and remotes. |
defaultHiddenSeries | readonly number[] | — | Initial hidden series positions when uncontrolled. |
description | LocalizedMessage | — | Longer description of the chart, read after its name: what it shows, or how to explore it with a keyboard. |
formatTooltipRow | ((row: BarChartTooltipRow) => ChartText) | — | Formats one tooltip row, the whole text beside the series swatch. Defaults to the series name and the formatted value. |
formatTooltipTitle | ((index: number, category: ChartText) => ChartText) | — | Formats the tooltip heading from the category position and its full label. Defaults to the category label. |
formatValue | ((value: number) => ChartText) | — | Formats a value for axis ticks, end labels, tooltip rows and the data table. Defaults to the runtime locale's
decimal format. Return toDisplayValue(...) for data, or a LocalizedMessage when the text carries a unit word. |
hiddenSeries | readonly number[] | — | Controlled list of hidden series positions. Pair with onHiddenSeriesChange. |
id | string | — | Id of the root element. |
legendPosition | ChartLegendPosition | — | Legend edge. Defaults to {@link ChartLegendPosition.Top}. |
locale | string | — | BCP 47 locale for the default value format. Defaults to the runtime locale. |
onHiddenSeriesChange | ((hiddenSeries: readonly number[], details: ChangeDetails<ChangeReason>) => void) | — | Called with the next list of hidden series positions when a legend entry is pressed, before it applies.
details.cancel() keeps the current list. |
orientation | BarChartOrientation | — | Vertical or horizontal bars. Defaults to {@link BarChartOrientation.Vertical}. |
palette | ChartPaletteInput | — | Series colors. Defaults to {@link ChartPalette.Categorical}. After the last color the order repeats. |
ref | Ref<HTMLDivElement> | — | Ref to the root element. |
showLegend | boolean | — | Paints a legend whose entries are buttons that show or hide a series or slice. Defaults to false. |
showTooltip | boolean | — | Shows the tooltip on hover and keyboard focus. Defaults to true. |
showValueAxis | boolean | — | Paints value axis tick labels beside the plot. Defaults to false. |
showValueLabels | boolean | — | Paints each value at the end of its bar, formatted by formatValue. Room for the labels is reserved
automatically. Defaults to false. |
stack | BarChartStack | — | How several series share a category: side by side, stacked end to end, or stacked as shares of the category's
total. A stacked bar rounds only the value end of its outermost segment. With showValueLabels, stacked bars write
the total of each stack at its end, and percent bars write no labels, since every bar ends at 100%. Defaults to
{@link BarChartStack.None}. |