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. |
beginAtZero | boolean | — | Includes zero on the value axis. Defaults to true. |
className | string | — | Classes appended after the generated classes. Put overrides in @layer chroma.overrides. |
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. |