Skip to content

Gauge chart

Gauge charts are data visualization elements that represent one or more values as a position on a radial scale. They display a simple and concise value in comparison to a maximum and minimum limit.

Element provides two gauge components:

  • ECharts-based gauge chart (SiChartGaugeComponent) — a full-featured gauge built on ECharts, part of @siemens/charts-ng.
  • Native gauge chart (SiNChartGaugeComponent) — a lightweight, dependency-free gauge, part of @siemens/native-charts-ng.

Usage

Gauge charts are commonly used to display performance metrics, such as percentage completion, quality scores or to indicate real-time values like temperature or speed.

The chart can be accompanied by color coding to indicate different ranges or thresholds. The gauge shows the value and its position between the minimum and maximum, highlighted with a color that corresponds to the range the value currently falls into.

Gauge chart

Best practices

  • Ensure that the numeric scale used is clear and easy to understand. It's helpful to include the maximum and minimum values, as well as any threshold or target values.
  • Color-coding is a useful way to indicate different ranges or thresholds. Choose colors that are meaningful in relation to the data being represented.
  • Keep it simple. Gauge charts are best suited for displaying simple, straightforward data.
  • If there is a need to represent a crucial system status (e.g: danger, warning or caution) provide additional visual cues, such as text labels or icons, to support accessibility.

Choosing a gauge component

Both components cover the same basic use case — showing a value against a minimum/maximum range — but differ in features, dependencies and footprint.

Use the ECharts-based gauge chart when you rely on ECharts-specific configuration options and when the application already uses ECharts for other charts.

Use the Native gauge chart when bundle size or runtime performance is a concern, or when you need to visualize multiple stacked values within a single ring.

Design

ECharts-based gauge chart

A gauge chart displays data similar to a circle chart, but with a needle or dial to indicate where the data point(s) falls over a particular range.

Gauge chart elements

  1. Progress, 2. Qualitative Range (Optional), 3. Base, 4. Unit, 5. Value, 6. Scale (Optional)

Native gauge chart

T.B.D

Code

ECharts-based gauge chart

Required Packages
import { SiChartGaugeComponent } from '@siemens/charts-ng/gauge';

@Component({
  imports: [SiChartGaugeComponent, ...]
})

SiChartGaugeComponent API Documentation

Source
import { SiChartGaugeComponent } from '@siemens/charts-ng/gauge';

Input Properties

NameTypeDefaultDescription
additionalOptionsinherited
EChartOption | undefined

Used to override specific properties set in options.

Inherited from SiChartBaseComponent

autoZoomSeriesIndexinherited
number -1

No auto dataZoom update) by default. Use together with visibleEntries.

Inherited from SiChartBaseComponent

axisNumberOfDecimals
number 0

Number of decimals on the axis. Possible values are from 0 to 100.

axisPointerinherited
string | boolean | undefined false

Used to display axisPointer line either by click or mouse-move.

Inherited from SiChartBaseComponent

colors
string[] | undefined

Colors for the defined segments. If there are less colors then segments, the colors will be repeated. Defaults to the standard color palette

customLegendActioninherited
boolean | undefined

Enable custom legend click actions exposed by the selectionChanged event.

Inherited from SiChartBaseComponent

dataZoomFilterModeinherited
FilterMode 'none'

The data zoom filter mode. (see https://echarts.apache.org/en/option.html#dataZoom-inside.filterMode)

The value 'filter' will cause the lines to be disconnected to the outside of the chart.

Inherited from SiChartBaseComponent

dataZoomMaxValueSpaninherited
number | undefined

The upper limit of the data zoom slider (see https://echarts.apache.org/en/option.html#dataZoom-slider.maxValueSpan).

Inherited from SiChartBaseComponent

dataZoomMinValueSpaninherited
number | undefined

The lower limit of the data zoom slider (see https://echarts.apache.org/en/option.html#dataZoom-slider.minValueSpan).

Inherited from SiChartBaseComponent

dataZoomRangeinherited
DataZoomRange | undefined

Apply a specific zoom range (see https://echarts.apache.org/en/option.html#dataZoom-inside).

Inherited from SiChartBaseComponent

eChartContainerHeightinherited
string | null | undefined

The height of the ECharts container as decimal.

Inherited from SiChartBaseComponent

externalXAxisFormatterinherited
((value: any, visibleRange: number) => string) | undefined

External XAxis Formatter from consumer

Inherited from SiChartBaseComponent

externalZoomSliderinherited
boolean false

Flag to use external zoom slider

Inherited from SiChartBaseComponent

hideAxisLabels
boolean false

Whether to hide the gauge-axis labels.

labelFormatter
((val: number) => string) | undefined

Custom formatter for axis labels. Takes precedence when specified, i.e. number of decimals, unit etc needs to be set by the user using this formatter.

maxEntriesinherited
number 1000

Maximum number of series data points shown in the chart.

Inherited from SiChartBaseComponent

maxNumberOfDecimals
number 0

Max number of decimals. Possible values are from 0 to 100.

maxValue
number 100

The highest value displayed on the gauge axis.

minNumberOfDecimals
number 0

Min number of decimals. Possible values are from 0 to 100.

minValue
number 0

The lowest value displayed on the gauge axis.

optionsinherited
EChartOption | undefined

See [ECharts 5.x Documentation]https://echarts.apache.org/en/option.html for all available options.

Inherited from SiChartBaseComponent

paletteinherited
string | undefined undefined

The name of the color palette (if any) of the loaded theme.

Inherited from SiChartBaseComponent

rendererinherited
"canvas" | "svg" 'canvas'

the renderer to use: canvas or svg

Inherited from SiChartBaseComponent

responsiveSplitSteps
boolean true

Whether the number of gauge-axis intervals adapts to the component size.

segments
number[] [0.2, 0.8, 1]

Segments on the arc from 0 (implicit) to 1 (explicit) E.g. 0.2 means from 0 to 0.2 of the possible range (maxValue - minValue)

selectedIteminherited
SelectedLegendItem { legendItemName: '' }

Specify selected legend item.

Inherited from SiChartBaseComponent

showCustomLegendinherited
boolean false

Enable to show a custom legend. The custom legend offers additional features such as, scroll bar to avoid legend and chart overlapping, Left and right alignment of legends based on y-axis, etc and many more.

Inherited from SiChartBaseComponent

showLegendinherited
boolean true

Show Echarts legend

Inherited from SiChartBaseComponent

showTimeRangeBarinheriteddeprecated
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.

Inherited from SiChartBaseComponent

splitSteps
number | undefined

The number of intervals displayed on the gauge axis.

subTitleinherited
string | undefined

The subtitle of the chart.

Inherited from SiChartBaseComponent

themeinherited
any

The desired theme to load.

Inherited from SiChartBaseComponent

themeCustomizationinherited
any

Used to override specific options of loaded theme.

Inherited from SiChartBaseComponent

titleinherited
string | undefined

The title of the chart.

Inherited from SiChartBaseComponent

unit
string '%'

The unit displayed with the gauge value.

unitsOnSplit
boolean false

Whether to display the unit on gauge-axis labels.

value
number 0

The value displayed by the gauge.

valueFormatter
((val: number) => string) | undefined

Custom formatter for value. Takes precedence when specified, i.e. number of decimals needs to be set by the user using this formatter.

visibleEntriesinherited
number -1

No auto dataZoom update) by default. Use together with autoZoomSeriesIndex.

Inherited from SiChartBaseComponent

visibleRangeinherited
number -1

No auto dataZoom update) by default. Use together with autoZoomSeriesIndex.

Inherited from SiChartBaseComponent

zoomInsideinherited
boolean false

Enables zooming inside the chart with the mouse wheel/touch.

Whether zooming inside the chart is possible with mouse.

Inherited from SiChartBaseComponent

zoomSliderinherited
boolean false

Enables the zoom slider below the chart.

Inherited from SiChartBaseComponent

zoomSliderBrushinherited
boolean true

enable brush mode for zoom slider

Inherited from SiChartBaseComponent

zoomSliderRealtimeinherited
boolean true

realtime update mode for zoom slider

Inherited from SiChartBaseComponent

zoomSliderShadowinherited
boolean true

Shows data shadow in dataZoom slider, use together with zoomSlider.

Inherited from SiChartBaseComponent

Output Properties

NameTypeDescription
chartGridResizedinherited
GridRectCoordinate

Event emitted when chart grid is resized.

Inherited from SiChartBaseComponent

chartSeriesClickinherited
LegendItem

Event emitted when a chart series is clicked.

Inherited from SiChartBaseComponent

customLegendMultiLineInfoEventinherited
CustomLegendMultiLineInfo[]

Event emitted when custom legend multi-line info changes.

Inherited from SiChartBaseComponent

dataZoominherited
DataZoomEvent

Event emitted when data zoom changes.

Inherited from SiChartBaseComponent

pointerinherited
AxisPointerEvent

Event emitted when axis pointer moves.

Inherited from SiChartBaseComponent

selectionChangedinherited
any

Event emitted when selection changes e.g. clicking on a legend item.

Inherited from SiChartBaseComponent

showLegendChangeinherited
boolean

Show Echarts legend

Inherited from SiChartBaseComponent

timeRangeChangeinherited
number

Emitted when data zoom changes, indicating the time range in milliseconds, 0 for full range

Inherited from SiChartBaseComponent

visibleEntriesChangeinherited
number

No auto dataZoom update) by default. Use together with autoZoomSeriesIndex.

Inherited from SiChartBaseComponent

visibleRangeChangeinherited
number

No auto dataZoom update) by default. Use together with autoZoomSeriesIndex.

Inherited from SiChartBaseComponent

Attributes and Methods

NameTypeDescription
startProgressIndication()inherited
() => void

Show loading indicator.

Inherited from SiChartBaseComponent

stopProgressIndication()inherited
() => void

Hide loading indicator.

Inherited from SiChartBaseComponent

Native gauge chart

import { SiNChartGaugeComponent } from '@siemens/native-charts-ng/gauge';

@Component({
  imports: [SiNChartGaugeComponent, ...]
})

Sum mode

Multiple series arcs are stacked on the gauge ring. The center shows their combined total.

Single mode

A single arc covers the ring. Colored background segments can be layered beneath the arc to indicate qualitative ranges.

SiNChartGaugeComponent API Documentation

Source
import { SiNChartGaugeComponent } from '@siemens/native-charts-ng/gauge';

Input Properties

NameTypeDefaultDescription
axisLabelFormatter
((val: number) => string) | undefined

Custom formatter for axis labels. Takes precedence when specified, i.e. number of decimals needs to be set by the user using this formatter.

axisNumberOfDecimals
number 0

Number of decimals on the axis. Possible values are from 0 to 100.

endAngle
number 90

End angle in degrees

legendPosition
"row" | "column" 'row'

Legend position:

• column: chart and legend form a column, i.e. the legend is below the chart. The chart size is driven by the available width.

• row: chart and legend form a row, i.e. the legend is besides the chart. The The chart size is driven by the available height.

markerValue
number | undefined

Optional value displayed as a marker bar across the value arc.

max
number 100

Max value, can be negative

maxNumberOfDecimals
number 2

Max number of decimals. Possible values are from 0 to 100.

min
number -100

Min value, can be negative

minNumberOfDecimals
number 0

Min number of decimals. Possible values are from 0 to 100.

mode
"sum" | "single" 'sum'

Display mode: sum to sum up multiple series or single for a single value with optional segmented display.

segments
GaugeSegment[] []

Colored segments.

series
GaugeSeries[] []

The series for the chart.

showLegend
boolean true

Whether to show the legend

showRangeLabelsOutside
boolean false

Whether to show range start/end labels on the outside of the ring

showTicks
boolean true

Whether to show ticks

startAngle
number -90

Start angle in degrees

unit
string ''

Unit

valueFormatter
((val: number) => string) | undefined

Custom formatter for value. Takes precedence when specified, i.e. number of decimals needs to be set by the user using this formatter.

Types Documentation

FilterMode

'none' | 'filter' | 'weakFilter' | 'empty'
type alias

One segment of the gauge chart. The first segment starts at the min value of the gauge chart and ends at endValue.

Properties

One series of the gauge chart.

Properties
Properties

AxisType

'value' | 'category' | 'time' | 'log'
type alias

Except where otherwise noted, content on this site is licensed under MIT License.