Configurable to display a single, multi, and stacked group variants of vertical and horizontal bar charts. Add thresholds across all variants through a matching api.
<pcac-bar-horizontal-chart [config]="barHorizontalChartConfig" (barClicked)="onClicked($event)"></pcac-bar-horizontal-chart>
<pcac-bar-vertical-chart [config]="barVerticalChartConfig" (barClicked)="onClicked($event)"></pcac-bar-vertical-chart>
import { PcacBarVerticalChart, PcacBarHorizontalChart } from '@pioneer-code/pioneer-charts';| Name | Description |
|---|---|
| data | Collection of PcacData objects. |
| height | Height of chart component. Default is 200px. |
| ariaLabel | What the chart shows, for screen readers — e.g. 'Sales by month, 2026'. The chart is announced as a group with this name, and each bar, slice or point inside it by its own key and value (see Accessibility). When omitted, its type is used: 'Bar chart', 'Pie chart', 'Line chart' and so on. |
| heightFull | If true, height is treated as a minimum height and the chart grows to fill its container whenever that container is taller. Default is false.
|
| xAxis / yAxis | Per-axis settings, one PcacAxisConfig for each axis. Every field is optional; omit the whole object for a default axis. See the Axis Styling guide for a live demo.
|
| yAxis.domainMax xAxis.domainMax | Top of the value axis (yAxis on the vertical chart, xAxis on the horizontal one), which always starts at 0 - domainMin is ignored on the bar charts. Default 100. The category axis ignores both. |
| yAxis.format xAxis.format | Formats the value axis's tick labels and the value in the default tooltip (same axis as above).
|
| isStacked | If false (the default), each group's bars are drawn side by side. If true, they are stacked: each bar's value is its own segment size, and segments are placed on top of one another in data order, so a group's total height is the sum of its values. Keep the value axis's domainMax at or above the largest group total. |
| thresholds | Threshold markers, configured with the same PcacData structure as the data; each one's value is where it's drawn on the value axis. How many levels you give decides what each threshold spans:
|
| spreadColorsPerGroup | If true, colors are assigned per group (every bar in a group shares its group's color) instead of per bar within a group. Default false. |
| colorOverride | Hex colors (with the leading #), used in order instead of the theme palette: the first series takes the first color (or, with spreadColorsPerGroup, the first group). Repeated when there are fewer colors than series. Omitted or empty, the theme palette is used. |
| Binding | Description | Payload |
|---|---|---|
| (barClicked)="service.onClicked($event)" | Emitted when a bar in the graph is clicked. | PcacData |