Bar Chart
The Bar Chart component displays data as vertical bars, making it easy to compare values across categories. Use it when you want to show how a numeric value differs across a set of groups, for example the number of active cases per region or total revenue per product category. You can connect it to any Shesha entity or a custom API endpoint, and switch between a simple single-series view and a pivot view that breaks data down by a second grouping dimension.
Properties
The following properties are available to configure the Bar Chart component from the form designer. These are in addition to the common properties shared by all Shesha components.
Common
Stacked boolean
When enabled, each bar group is rendered as a single stacked bar with coloured segments for each group value, rather than side-by-side bars. Only appears when Simple / Pivot is set to Pivot, and only for entity-backed charts (it is hidden when Data Source Type is URL).
The Common tab also has two collapsible shortcut panels: Quick Settings (Data Source Type, Simple / Pivot, and the core data-binding fields) and Labels (title and axis label fields). They edit the exact same properties documented below under Data Settings and Chart Settings - they just let you configure the basics without switching tabs.
Chart Settings
Simple / Pivot object
Controls whether the chart displays one data series or multiple.
| Option | When to use |
|---|---|
Simple | Show one bar per category. Use this for straightforward comparisons. |
Pivot | Split each category into multiple bars, one per group. Use this to compare across two dimensions at once. |