Bar chart¶
Shows the differences or similarities between values. Bar chart data answers the question of "how many?" in each category.
Usage¶
Use it to perform a comparison of values across different subgroups of data. From a bar chart, it can be seen which groups are highest or most common, and how groups compare against each other.
Basic variant¶
The basic bar chart shows numerical comparisons across categories. One axis of the chart shows the specific categories being compared and the other axis is numeric in nature.

Multi-set variant¶
This variation is used when two or more data series are plotted side-by-side and grouped together under categories, all on the same axis.

Stacked variant¶
The stacked bar chart is used to show how a category is divided. It helps to understand what relationship each part has with the total amount.

Best practices¶
- Plot the bars against a zero-value baseline to accurately reflect the difference in the data.
- Use colors with purpose. Select accent colors to highlight meaningful changes.
- Bar charts can be vertical or horizontal. Horizontal bar charts work best when there are lots of different categories with long labels.
- Use common sense and adjust the width of the bars according to the amount of elements. The minimum bar width is
16px.
Design¶

- Bars, 2. Y axis, 3.Legend, 4.Grid lines, 5. X axis
Code¶
Usage¶
Required Packages
import { SiChartCartesianComponent } from '@siemens/charts-ng';
@Component({
imports: [SiChartCartesianComponent, ...]
})
Simple Bar Chart¶
Stacked Bar Chart¶
The same component can also be used in a stacked configuration.
SiChartCartesianComponent API Documentation¶
si-chart-cartesianInput Properties¶
| Name | Type | Default | Description |
|---|---|---|---|
| additionalOptions ¶ | EChartOption | Used to override specific properties set in options . | |
| autoZoomSeriesIndex ¶ | number | -1 | No auto dataZoom update) by default. Use together with visibleEntries . |
| axisPointer ¶ | (undefined | string | boolean) | false | Used to display axisPointer line either by click or mouse-move. |
| customLegendAction ¶ | boolean | ||
| dataZoomFilterMode ¶ | FilterMode | 'none' | |
| dataZoomMaxValueSpan ¶ | number | ||
| dataZoomMinValueSpan ¶ | number | ||
| dataZoomRange ¶ | DataZoomRange | ||
| eChartContainerHeight ¶ | (null | string) | ||
| externalXAxisFormatter ¶ | (value: any, visibleRange: number) => string | External XAxis Formatter from consumer | |
| externalZoomSlider ¶ | boolean | false | Flag to use external zoom slider |
| maxEntries ¶ | number | 1000 | |
| options ¶ | EChartOption | See [ECharts 5.x Documentation] https://echarts.apache.org/en/option.html for all available options. | |
| palette ¶ | string | undefined | The name of the color palette (if any) of the loaded theme . |
| renderer ¶ | ("canvas" | "svg") | 'canvas' | the renderer to use: canvas or svg |
| selectedItem ¶ | SelectedLegendItem | { legendItemName: '' } | |
| series ¶ | CartesianChartSeries[] | ||
| showCustomLegend ¶ | boolean | false | |
| showLegend ¶ | boolean | true | |
| stacked ¶ | boolean | false | Used to display the chart as a stacked one. |
| subChartGrids ¶ | SubchartGrid[] | ||
| subTitle ¶ | string | ||
| theme ¶ | any | The desired theme to load. | |
| themeCustomization ¶ | any | Used to override specific options of loaded theme . | |
| title ¶ | string | ||
| tooltipFormatter ¶ | (string | TooltipFormatterCallback<TopLevelFormatterParams>) | ||
| visibleEntries ¶ | number | -1 | No auto dataZoom update) by default. Use together with autoZoomSeriesIndex . |
| visibleRange ¶ | number | -1 | No auto dataZoom update) by default. Use together with autoZoomSeriesIndex . |
| xAxis ¶ | (ChartXAxis | ChartXAxis[]) | ||
| yAxis ¶ | (ChartYAxis | ChartYAxis[]) | ||
| zoomInside ¶ | boolean | false | Enables zooming inside the chart with the mouse wheel/touch. |
| zoomMode ¶ | boolean | Enable or disable brush zoom mode | |
| zoomSlider ¶ | boolean | false | Enables the zoom slider below the chart. |
| zoomSliderBrush ¶ | boolean | true | enable brush mode for zoom slider |
| zoomSliderRealtime ¶ | boolean | true | realtime update mode for zoom slider |
| zoomSliderShadow ¶ | boolean | true | Shows data shadow in dataZoom slider, use together with zoomSlider . |
| showTimeRangeBar | boolean | false | If true, add consumer-provided time range bar. Use together with zoomSlider .Deprecated: The input will be removed in future versions as the time range bar slot is deprecated. |
Output Properties¶
| Name | Type | Description |
|---|---|---|
| chartGridResized ¶ | GridRectCoordinate | Event emitted when chart grid is resized. |
| chartSeriesClick ¶ | LegendItem | |
| customLegendMultiLineInfoEvent ¶ | CustomLegendMultiLineInfo[] | |
| dataZoom ¶ | DataZoomEvent | Event emitted when data zoom changes. |
| pointer ¶ | AxisPointerEvent | Event emitted when axis pointer moves. |
| selectionChanged ¶ | any | |
| showLegendChange ¶ | boolean | |
| timeRangeChange ¶ | number | Emitted when datazoom changes, indicating the time range in milliseconds, 0 for full range |
| visibleEntriesChange ¶ | number | No auto dataZoom update) by default. Use together with autoZoomSeriesIndex . |
| visibleRangeChange ¶ | number | No auto dataZoom update) by default. Use together with autoZoomSeriesIndex . |
Attributes and Methods¶
| Name | Type | Default | Description |
|---|---|---|---|
| startProgressIndication() ¶ | () => void | Show loading indicator. | |
| stopProgressIndication() ¶ | () => void | Hide loading indicator. |
Types Documentation¶
| |||||
|
|
|
|
import imported from echarts |
|---|
import imported from echarts |
|---|
| ||||||||||||||
|
| |||||||||||||||
|
|
|
|
|
|
|
|
|
| Copyright (c) Siemens 2016 - 2025 SPDX-License-Identifier: MIT |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
| imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
| imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
|
|
|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
| imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
import imported from echarts |
|---|
Except where otherwise noted, content on this site is licensed under MIT License.