<st-bar-chart>
JSON type: BarChart
A vertical bar chart for a fixed set of categories: value labels above the bars, gridlines with
labels on the left, and category labels underneath. Heights scale to max, or to the largest
bar or tick when max is not set. Values are not formatted here: pass valueLabel and tick
labels already formatted (currency, lakh/crore), so this element stays locale-free.
Usage
import '@sankhyatronics/sankhya-cms/bar-chart'; // registers <st-bar-chart>
Properties
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
bars | — | BarChartBar[] | [] | The bars, in order from left to right. |
ticks | — | BarChartTick[] | [] | Optional gridlines with labels. |
max | max | number | null | null | The value that maps to the top of the plot. Defaults to the largest bar or tick. |
plotHeight | plot-height | number | 200 | Plot height in pixels, excluding category labels. |
chartLabel | chart-label | string | '' | Accessible name for the chart. |
See the live examples in Storybook.