Skip to content

Scatter chart

A Scatter chart uses dots to represent values for two different numeric variables. The position of each dot on the horizontal and vertical axis represents the values of an individual data point.

Usage

Use this chart to show the correlation between two variables, to identify a distribution pattern or potential outliers.

Different shapes can be used to make the information more accessible. The circle is the default shape, but it can be combined with rectangle, triangle or diamond shapes as needed.

Scatter chart

Best practices

  • Use colors and shapes to help differentiate between data points.
  • Provide context for the data by including relevant annotations and explaining the significance of trends and highlighted patterns.
  • Avoid overcrowding the chart by limiting the number of data points displayed or by using a subset of data that is representative of the overall trend.
  • Consider the distribution of the data on both the X and Y axes and choose an appropriate axis scale that accurately reflects the relationships between the variables.
  • Keep the design of the chart simple and uncluttered. Avoid adding unnecessary elements that can distract from the data.

Design

If you want to display values as a collection of points, a scatter chart would be your best choice.

Scatter chart elements

  1. Chart title, 2. Legend, 3. Points, 4. X axis, 5. Y axis

Code

Usage

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

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

SiChartCartesianComponent API Documentation

import { SiChartCartesianComponent } from '@siemens/charts-ng/cartesian';

Input Properties

Name Type Default Description
additionalOptions inherited
EChartOption | undefined

Used to override specific properties set in options.

Inherited from SiChartBaseComponent

autoZoomSeriesIndex inherited
number -1

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

Inherited from SiChartBaseComponent

axisPointer inherited
string | boolean | undefined false

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

Inherited from SiChartBaseComponent

customLegendAction inherited
boolean | undefined

Enable custom legend click actions exposed by the selectionChanged event.

Inherited from SiChartBaseComponent

dataZoomFilterMode inherited
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

dataZoomMaxValueSpan inherited
number | undefined

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

Inherited from SiChartBaseComponent

dataZoomMinValueSpan inherited
number | undefined

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

Inherited from SiChartBaseComponent

dataZoomRange inherited
DataZoomRange | undefined

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

Inherited from SiChartBaseComponent

eChartContainerHeight inherited
string | null | undefined

The height of the ECharts container as decimal.

Inherited from SiChartBaseComponent

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

External XAxis Formatter from consumer

Inherited from SiChartBaseComponent

externalZoomSlider inherited
boolean false

Flag to use external zoom slider

Inherited from SiChartBaseComponent

maxEntries inherited
number 1000

Maximum number of series data points shown in the chart.

Inherited from SiChartBaseComponent

options inherited
EChartOption | undefined

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

Inherited from SiChartBaseComponent

palette inherited
string | undefined undefined

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

Inherited from SiChartBaseComponent

renderer inherited
"canvas" | "svg" 'canvas'

the renderer to use: canvas or svg

Inherited from SiChartBaseComponent

selectedItem inherited
SelectedLegendItem { legendItemName: '' }

Specify selected legend item.

Inherited from SiChartBaseComponent

series
CartesianChartSeries[] | undefined

The series for the chart.

showCustomLegend inherited
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

showLegend inherited
boolean true

Show Echarts legend

Inherited from SiChartBaseComponent

showTimeRangeBar inherited deprecated
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

stacked
boolean false

Used to display the chart as a stacked one.

subChartGrids
SubchartGrid[] | undefined

Grid definitions for rendering series in subcharts.

subTitle inherited
string | undefined

The subtitle of the chart.

Inherited from SiChartBaseComponent

theme inherited
any

The desired theme to load.

Inherited from SiChartBaseComponent

themeCustomization inherited
any

Used to override specific options of loaded theme.

Inherited from SiChartBaseComponent

title inherited
string | undefined

The title of the chart.

Inherited from SiChartBaseComponent

tooltipFormatter
string | TooltipComponentFormatterCallback<TooltipComponentFormatterCallbackParams> | undefined

The content formatter of the tooltip's floating layer, supporting string templates and callbacks. Custom formatters are responsible for escaping untrusted values with echarts.format.encodeHTML before inserting them into HTML. Built-in formatters display names and values as plain text. See https://echarts.apache.org/en/option.html#tooltip.formatter.

visibleEntries inherited
number -1

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

Inherited from SiChartBaseComponent

visibleRange inherited
number -1

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

Inherited from SiChartBaseComponent

xAxis
ChartXAxis | ChartXAxis[] | undefined

The x axis in cartesian(rectangular) coordinate.

yAxis
ChartYAxis | ChartYAxis[] | undefined

The y axis in cartesian(rectangular) coordinate.

zoomInside inherited
boolean false

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

Whether zooming inside the chart is possible with mouse.

Inherited from SiChartBaseComponent

zoomMode
boolean | undefined

Whether brush zoom mode is enabled.

zoomSlider inherited
boolean false

Enables the zoom slider below the chart.

Inherited from SiChartBaseComponent

zoomSliderBrush inherited
boolean true

enable brush mode for zoom slider

Inherited from SiChartBaseComponent

zoomSliderRealtime inherited
boolean true

realtime update mode for zoom slider

Inherited from SiChartBaseComponent

zoomSliderShadow inherited
boolean true

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

Inherited from SiChartBaseComponent

Output Properties

Name Type Description
chartGridResized inherited
GridRectCoordinate

Event emitted when chart grid is resized.

Inherited from SiChartBaseComponent

chartSeriesClick inherited
LegendItem

Event emitted when a chart series is clicked.

Inherited from SiChartBaseComponent

customLegendMultiLineInfoEvent inherited
CustomLegendMultiLineInfo[]

Event emitted when custom legend multi-line info changes.

Inherited from SiChartBaseComponent

dataZoom inherited
DataZoomEvent

Event emitted when data zoom changes.

Inherited from SiChartBaseComponent

pointer inherited
AxisPointerEvent

Event emitted when axis pointer moves.

Inherited from SiChartBaseComponent

selectionChanged inherited
any

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

Inherited from SiChartBaseComponent

showLegendChange inherited
boolean

Show Echarts legend

Inherited from SiChartBaseComponent

timeRangeChange inherited
number

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

Inherited from SiChartBaseComponent

visibleEntriesChange inherited
number

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

Inherited from SiChartBaseComponent

visibleRangeChange inherited
number

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

Inherited from SiChartBaseComponent

Attributes and Methods

Name Type Description
startProgressIndication() inherited
() => void

Show loading indicator.

Inherited from SiChartBaseComponent

stopProgressIndication() inherited
() => void

Hide loading indicator.

Inherited from SiChartBaseComponent

Types Documentation

Properties
Index Signatures

Properties
Index Signatures

FilterMode

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

Properties
  • If enable animation

    animation ? : boolean

    inherited
  • Delay of initialize animation Can be a callback to specify duration of each element

    animationDelay ? : number | AnimationDelayCallback

    inherited
  • Delay of data update animation. Can be a callback to specify duration of each element

    animationDelayUpdate ? : number | AnimationDelayCallback

    inherited
  • Duration of initialize animation. Can be a callback to specify duration of each element

    animationDuration ? : number | AnimationDurationCallback

    inherited
  • Delay of data update animation. Can be a callback to specify duration of each element

    animationDurationUpdate ? : number | AnimationDurationCallback

    inherited
  • Easing of initialize animation

    animationEasing ? : ("linear" | "quadraticIn" | "quadraticOut" | "quadraticInOut" | "cubicIn" | "cubicOut" | "cubicInOut" | "quarticIn" | "quarticOut" | "quarticInOut" | "quinticIn" | "quinticOut" | "quinticInOut" | "sinusoidalIn" | "sinusoidalOut" | "sinusoidalInOut" | "exponentialIn" | "exponentialOut" | "exponentialInOut" | "circularIn" | "circularOut" | "circularInOut" | "elasticIn" | "elasticOut" | "elasticInOut" | "backIn" | "backOut" | "backInOut" | "bounceIn" | "bounceOut" | "bounceInOut" | ((percent: number) => number))

    inherited
  • Easing of data update animation.

    animationEasingUpdate ? : ("linear" | "quadraticIn" | "quadraticOut" | "quadraticInOut" | "cubicIn" | "cubicOut" | "cubicInOut" | "quarticIn" | "quarticOut" | "quarticInOut" | "quinticIn" | "quinticOut" | "quinticInOut" | "sinusoidalIn" | "sinusoidalOut" | "sinusoidalInOut" | "exponentialIn" | "exponentialOut" | "exponentialInOut" | "circularIn" | "circularOut" | "circularInOut" | "elasticIn" | "elasticOut" | "elasticInOut" | "backIn" | "backOut" | "backInOut" | "bounceIn" | "bounceOut" | "bounceInOut" | ((percent: number) => number))

    inherited
  • Disable animation when the number of elements exceeds the threshold

    animationThreshold ? : number

    inherited
  • area ? : boolean

  • areaStyle ? : (AreaStyleOption<Color> & { origin?: "auto" | "start" | "end" | number; })

    inherited
  • blendMode ? : string

    inherited
  • Blur states.

    blur ? : (LineStateOption<DefaultLabelFormatterCallbackParams> & { lineStyle?: LineStyleOption<Color>; areaStyle?: AreaStyleOption<Color>; })

    inherited
  • clip ? : boolean

    inherited
  • color ? : Color | Color[]

    inherited
  • colorBy ? : ("data" | "series")

    inherited
  • colorLayer ? : Color[][]

    inherited
  • connectNulls ? : boolean

    inherited
  • coord ? : (Date | (string | number)) | (null | undefined) | ((Date | (string | number)) | (null | undefined))[] | ((Date | (string | number)) | (null | undefined) | (Date | (string | number))[])[]

    inherited
  • coordinateSystem ? : "cartesian2d" | "polar"

    inherited
  • coordinateSystemUsage ? : ("data" | "box")

    inherited
  • Cursor when mouse on the elements

    cursor ? : string

    inherited
  • customLegendToolTip ? : string Inherited from SiSeriesOption

  • data ? : (((string | number | Date | null | undefined) | (string | number | Date | null | undefined)[]) | LineDataItemOption)[]

    inherited
  • groupId of data. can be used for doing drilldown / up animation It will be ignored if:

    • groupId is specified in each data

    • encode.itemGroupId is given.

    dataGroupId ? : (string | number)

    inherited
  • datasetId ? : string | number

    inherited
  • datasetIndex ? : number

    inherited
  • dimensions ? : (string | { type?: "number" | "time" | "float" | "int" | "ordinal"; name?: string; displayName?: string; } | undefined)[]

    inherited
  • displayName ? : string Inherited from SiSeriesOption

  • Emphasis states

    emphasis ? : (LineStateOption<DefaultLabelFormatterCallbackParams> & { focus?: "none" | "series" | "self"; scale?: boolean | number; } & { lineStyle?: Omit<LineStyleOption<Color>, "width"> & { width?: (number | undefined) | "bolder"; }; areaStyle?: AreaStyleOption<Color>; } & { blurScope?: "coordinateSystem" | "series" | "global"; disabled?: boolean; })

    inherited
  • encode ? : OptionEncode

    inherited
  • endLabel ? : LineEndLabelOption

    inherited
  • hoverLayerThreshold ? : number

    inherited
  • id ? : (string | number)

    inherited
  • itemStyle ? : ItemStyleOption<DefaultLabelFormatterCallbackParams>

    inherited
  • label ? : SeriesLabelOption<DefaultLabelFormatterCallbackParams, { positionExtra: never; }>

    inherited
  • Overall label layout option in label layout stage.

    labelLayout ? : LabelLayoutOption | LabelLayoutOptionCallback

    inherited
  • labelLine ? : LabelLineOption

    inherited
  • lineStyle ? : LineStyleOption<Color>

    inherited
  • mainType ? : "series"

    inherited
  • markArea ? : MarkAreaComponentOption

    inherited
  • markLine ? : MarkLineComponentOption

    inherited
  • markPoint ? : MarkPointComponentOption

    inherited
  • name ? : (string | number)

    inherited
  • polarId ? : (string | number)

    inherited
  • polarIndex ? : number

    inherited
  • Configurations about progressive rendering

    progressive ? : number | false

    inherited
  • progressiveChunkMode ? : "mod"

    inherited
  • progressiveThreshold ? : number

    inherited
  • sampling ? : "none" | "average" | "min" | "max" | "minmax" | "sum" | "lttb" | ((frame: ArrayLike<number>) => number)

    inherited
  • Select states

    select ? : (LineStateOption<DefaultLabelFormatterCallbackParams> & { disabled?: boolean; })

    inherited
  • Map of selected data key is name or index of data.

    selectedMap ? : { [key: string]: boolean; } | "all"

    inherited
  • selectedMode ? : boolean | "series" | "single" | "multiple"

    inherited
  • When dataset is used, seriesLayoutBy specifies whether the column or the row of dataset is mapped to the series namely, the series is "layout" on columns or rows

    seriesLayoutBy ? : "column" | "row" = 'column'

    inherited
  • showAllSymbol ? : boolean | "auto"

    inherited
  • showSymbol ? : boolean

    inherited
  • silent ? : boolean

    inherited
  • smooth ? : number | boolean

    inherited
  • smoothMonotone ? : "none" | "x" | "y"

    inherited
  • sourceHeader ? : (number | boolean | "auto")

    inherited
  • stack ? : string

    inherited
  • stackOrder ? : "seriesAsc" | "seriesDesc"

    inherited
  • stackStrategy ? : "all" | "samesign" | "positive" | "negative"

    inherited
  • Animation config for state transition.

    stateAnimation ? : AnimationOption$1

    inherited
  • step ? : false | "start" | "end" | "middle"

    inherited
  • type of symbol, like cirlce, rect, or custom path and image.

    symbol ? : string | ((rawValue: any, params: DefaultLabelFormatterCallbackParams) => string)

    inherited
  • symbolKeepAspect ? : boolean

    inherited
  • symbolOffset ? : string | number | (string | number)[] | ((rawValue: any, params: DefaultLabelFormatterCallbackParams) => string | number | (string | number)[])

    inherited
  • symbolRotate ? : number | ((rawValue: any, params: DefaultLabelFormatterCallbackParams) => number)

    inherited
  • Size of symbol.

    symbolSize ? : number | number[] | ((rawValue: any, params: DefaultLabelFormatterCallbackParams) => number | number[])

    inherited
  • tooltip ? : (CommonTooltipOption<DefaultLabelFormatterCallbackParams> & { trigger?: "item" | "axis" | boolean | "none"; })

    inherited
  • Whether to trigger event when hovering on the line or the area

    @since: v6.0.1

    triggerEvent ? : boolean | "line" | "area"

    inherited
  • Deprecated: This option has been deprecated since v6.0.1. Use triggerEvent: 'line' for only line event or triggerEvent: true for both line and area event.

    triggerLineEvent ? : boolean

    inherited deprecated
  • type ? : "line"

    inherited
  • If enabled universal transition cross series.

    Example:

    universalTransition: true
     universalTransition: { enabled: true }
    

    universalTransition ? : boolean | UniversalTransitionOption

    inherited
  • visible ? : boolean Inherited from SiSeriesOption

  • xAxisId ? : (string | number)

    inherited
  • xAxisIndex ? : number

    inherited
  • yAxisId ? : (string | number)

    inherited
  • yAxisIndex ? : number

    inherited
  • z ? : number

    inherited
  • zlevel ? : number

    inherited

YAxisPosition

'left' | 'right'
type alias

AxisType

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

XAxisPosition

'top' | 'bottom'
type alias

Properties

Properties

Properties

Properties


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