A Scatter Series identifies the correlation between values across two categories, and can highlight outliers and gaps in the data.
To create a Scatter Series use the
'scatter' series type.
In this configuration:
xKeydefines the numerical values for the x axis, and is mapped by default to a Number.
yKeyprovides the numerical values for the y axis, and is mapped by default to a Number Axis.
yNameare optional and configure display names, reflected in Tooltips.
titleis optional and is used in the Tooltip Titles and Legend Items.
It is possible to customise the fill, stroke and shape of the markers used in the Scatter Series.
In the above example, the 'females' series uses
'circle' markers and the 'male' series uses
To show labels for a Scatter Series set the
label.enabled config of a series to
true and specify which key should be used to fetch the label values.
Scatter Series label placement is constrained so that:
- labels don't overlap any markers
- labels don't overlap other labels
If these constraints are not satisfied, a label is not placed.
Try opening the above example in a larger window to see that more labels are placed as the chart gets bigger. You can also try changing the size of the markers and the font size of the labels to see how that affects label placement.
Satisfying these constraints is computationally intensive and the complexity rises exponentially with increasing number of data points. Given that label placement might have to happen in real time, for example, when resizing a chart window, it is advised not to enable Scatter Series labels for data sets with more than a few hundred points.