Skip to content

Generic chartΒΆ

A generic chart with full support for ECharts options.

CodeΒΆ

UsageΒΆ

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

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

SiChartComponent API DocumentationΒΆ

selector
si-chart

Input PropertiesΒΆ

NameTypeDefaultDescription
additionalOptions
ΒΆ
EChartOptionUsed to override specific properties set in options .
autoZoomSeriesIndex
ΒΆ
number-1No auto dataZoom update) by default. Use together with visibleEntries .
axisPointer
ΒΆ
(undefined | string | boolean)falseUsed to display axisPointer line either by click or mouse-move.
customLegendAction
ΒΆ
booleanEnable custom legend click actions exposed by the selectionChanged event.
dataZoomFilterMode
ΒΆ
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.
dataZoomMaxValueSpan
ΒΆ
numberThe upper limit of the data zoom slider (see https://echarts.apache.org/en/option.html#dataZoom-slider.maxValueSpan ).
dataZoomMinValueSpan
ΒΆ
numberThe lower limit of the data zoom slider (see https://echarts.apache.org/en/option.html#dataZoom-slider.minValueSpan ).
dataZoomRange
ΒΆ
DataZoomRangeApply a specific zoom range (see https://echarts.apache.org/en/option.html#dataZoom-inside ).
eChartContainerHeight
ΒΆ
(null | string)The height of the ECharts container as decimal.
externalXAxisFormatter
ΒΆ
(value: any, visibleRange: number) => stringExternal XAxis Formatter from consumer
externalZoomSlider
ΒΆ
booleanfalseFlag to use external zoom slider
maxEntries
ΒΆ
number1000Maximum number of series data points shown in the chart.
options
ΒΆ
EChartOptionSee [ECharts 5.x Documentation] https://echarts.apache.org/en/option.html for all available options.
palette
ΒΆ
stringundefinedThe 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: '' }Specify selected legend item.
showCustomLegend
ΒΆ
booleanfalseEnable 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.
showLegend
ΒΆ
booleantrueShow Echarts legend
subTitle
ΒΆ
stringThe subtitle of the chart.
theme
ΒΆ
anyThe desired theme to load.
themeCustomization
ΒΆ
anyUsed to override specific options of loaded theme .
title
ΒΆ
stringThe title of the chart.
visibleEntries
ΒΆ
number-1No auto dataZoom update) by default. Use together with autoZoomSeriesIndex .
visibleRange
ΒΆ
number-1No auto dataZoom update) by default. Use together with autoZoomSeriesIndex .
zoomInside
ΒΆ
booleanfalseEnables zooming inside the chart with the mouse wheel/touch.

Whether zooming inside the chart is possible with mouse.
zoomSlider
ΒΆ
booleanfalseEnables the zoom slider below the chart.
zoomSliderBrush
ΒΆ
booleantrueenable brush mode for zoom slider
zoomSliderRealtime
ΒΆ
booleantruerealtime update mode for zoom slider
zoomSliderShadow
ΒΆ
booleantrueShows data shadow in dataZoom slider, use together with zoomSlider .
showTimeRangeBar
DeprecatedΒΆ
booleanfalseIf 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ΒΆ

NameTypeDescription
chartGridResized
ΒΆ
GridRectCoordinateEvent emitted when chart grid is resized.
chartSeriesClick
ΒΆ
LegendItemEvent emitted when a chart series is clicked.
customLegendMultiLineInfoEvent
ΒΆ
CustomLegendMultiLineInfo[]Event emitted when custom legend multi-line info changes.
dataZoom
ΒΆ
DataZoomEventEvent emitted when data zoom changes.
pointer
ΒΆ
AxisPointerEventEvent emitted when axis pointer moves.
selectionChanged
ΒΆ
anyEvent emitted when selection changes e.g. clicking on a legend item.
showLegendChange
ΒΆ
booleanShow Echarts legend
timeRangeChange
ΒΆ
numberEmitted when data zoom changes, indicating the time range in milliseconds, 0 for full range
visibleEntriesChange
ΒΆ
numberNo auto dataZoom update) by default. Use together with autoZoomSeriesIndex .
visibleRangeChange
ΒΆ
numberNo auto dataZoom update) by default. Use together with autoZoomSeriesIndex .

Attributes and MethodsΒΆ

NameTypeDefaultDescription
startProgressIndication()
ΒΆ
() => voidShow loading indicator.
stopProgressIndication()
ΒΆ
() => voidHide loading indicator.

Types DocumentationΒΆ

Index signature: [ key: string ]: anyΒΆ
Properties
dataZoom?: DataZoomComponentOption[]ΒΆ
grid?: (GridComponentOption | GridComponentOption[])ΒΆ
legend?: LegendComponentOption[]ΒΆ
series?: EChartSeriesΒΆ
("none" | "filter" | "weakFilter" | "empty")ΒΆ
Properties
end?: anyΒΆ
endValue?: anyΒΆ
start?: anyΒΆ
startValue?: anyΒΆ
visibleWidth?: anyΒΆ
Properties
legendItemName: stringΒΆ
Properties
containerHeight: numberΒΆ
containerWidth: numberΒΆ
height: numberΒΆ
width: numberΒΆ
x: numberΒΆ
y: numberΒΆ
Properties
color?: stringΒΆ
dataIndex: numberΒΆ
itemName: stringΒΆ
selected?: booleanΒΆ
Properties
customLegendId: numberΒΆ
isCustomLegendMultilined: booleanΒΆ
Properties
autoZoomUpdate?: booleanΒΆ
rangeEnd: anyΒΆ
rangeStart: anyΒΆ
rangeType: AxisTypeΒΆ
requested?: DataZoomRangeΒΆ
source?: stringΒΆ
width?: numberΒΆ
Properties
dataIndex?: numberΒΆ
seriesIndex?: numberΒΆ
Properties
backgroundColor?: ZRColorΒΆ
borderColor?: ZRColorΒΆ
borderWidth?: numberΒΆ
bottom?: PositionSizeOption from BoxLayoutOptionMixin.bottomΒΆ
Deprecated: Use grid.outerBounds instead. Whether grid size contains axis labels. This approach estimates the size by sample labels. It works for most case but it does not strictly contain all labels in some cases.
containLabel?: booleanΒΆ
coord?: CoordinateSystemDataCoord from ComponentOption.coordΒΆ
coordinateSystem?: string from ComponentOption.coordinateSystemΒΆ
coordinateSystemUsage?: CoordinateSystemUsageOption from ComponentOption.coordinateSystemUsageΒΆ
height?: PositionSizeOption from BoxLayoutOptionMixin.heightΒΆ
id?: OptionId from ComponentOption.idΒΆ
left?: PositionSizeOption from BoxLayoutOptionMixin.leftΒΆ
mainType?: "grid"ΒΆ
name?: OptionName from ComponentOption.nameΒΆ
{left, right, top, bottom, width, height}: Define a outerBounds rect, based on: - the canvas by default. - or the dataToLayout result if a boxCoordinateSystem is specified.
outerBounds?: BoxLayoutOptionMixinΒΆ
outerBoundsClampHeight?: (string | number)ΒΆ
Available only when outerBoundsMode is not 'none'. Offer a constraint to not to shrink the grid rect causing smaller that width/height. A string means percent, like '30%', based on the original rect size determined by grid.top/right/bottom/left/width/height .
outerBoundsClampWidth?: (string | number)ΒΆ
- 'all': Default. Contains the cartesian rect and axis labels and axis name. - 'axisLabel': Contains the cartesian rect and axis labels. This effect differs slightly from the previous option containLabel but more precise. - 'auto'/null/undefined: Default. be 'axisLabel' if containLabel:true , otherwise 'all'.
outerBoundsContain?: ("all" | "auto" | "axisLabel" | NullUndefined$1)ΒΆ
Define a constrains rect. Axis lines is firstly laid out based on the rect defined by grid.left/right/top/bottom/width/height . (for axis line alignment requirements between multiple grids) But if axisLabel and/or axisName overflow the outerBounds, shrink the layout to avoid that overflow.

Options: - 'none': outerBounds is infinity. - 'same': outerBounds is the same as the layout rect defined by grid.left/right/top/bottom/width/height . - 'auto'/null/undefined: Default. Use outerBounds , or 'same' if containLabel:true .

Note: grid.containLabel is equivalent to {outerBoundsMode: 'same', outerBoundsContain: 'axisLabel'} .

outerBoundsMode?: ("auto" | "none" | "same" | NullUndefined$1)ΒΆ
right?: PositionSizeOption from BoxLayoutOptionMixin.rightΒΆ
shadowBlur?: number from ShadowOptionMixin.shadowBlurΒΆ
shadowColor?: string from ShadowOptionMixin.shadowColorΒΆ
shadowOffsetX?: number from ShadowOptionMixin.shadowOffsetXΒΆ
shadowOffsetY?: number from ShadowOptionMixin.shadowOffsetYΒΆ
show?: booleanΒΆ
tooltip?: anyΒΆ
top?: PositionSizeOption from BoxLayoutOptionMixin.topΒΆ
type?: string from ComponentOption.typeΒΆ
width?: PositionSizeOption from BoxLayoutOptionMixin.widthΒΆ
z?: number from ComponentOption.zΒΆ
zlevel?: number from ComponentOption.zlevelΒΆ
("value" | "category" | "time" | "log")ΒΆ
imported from echarts
imported from echarts
imported from echarts
imported from echarts
imported from echarts
imported from echarts
imported from echarts
imported from echarts
imported from echarts
imported from echarts
imported from echarts
imported from echarts
imported from echarts
imported from echarts
imported from echarts
imported from echarts
imported from echarts
imported from echarts
imported from echarts
imported from echarts
imported from echarts
imported from echarts
imported from echarts
imported from echarts
imported from echarts

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