Class ScatterSeries
The ScatterSeries displays a collection of data points represented by a circle of equal size.
Implements
Inherited Members
Namespace: Syncfusion.UI.Xaml.Charts
Assembly: Syncfusion.Chart.WinUI.dll
Syntax
public class ScatterSeries : XyDataSeries, INotifyPropertyChanged
Remarks
To render a series, create an instance of ScatterSeries class, and add it to the Series collection.
It provides options for Fill, PaletteBrushes, StrokeWidth, Stroke, and opacity to customize the appearance.
Size - Specify the circle size using the PointHeight, and PointWidth properties.
EnableTooltip - A tooltip displays information while tapping or mouse hovering over a segment. To display the tooltip on chart, need to set the EnableTooltip property as true in ScatterSeries class, and also refer TooltipBehavior property.
Data Label - Data labels are used to display values related to a chart segment. To render the data labels, you need to set the
Animation - To animate the series, set True to the EnableAnimation property.
LegendIcon - To customize the legend icon using the LegendIcon property.
Examples
<chart:SfCartesianChart>
<chart:SfCartesianChart.XAxes>
<chart:NumericalAxis/>
</chart:SfCartesianChart.XAxes>
<chart:SfCartesianChart.YAxes>
<chart:NumericalAxis/>
</chart:SfCartesianChart.YAxes>
<chart:ScatterSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
PointHeight = "30"
PointWidth = "30"/>
</chart:SfCartesianChart>
Constructors
ScatterSeries()
Declaration
public ScatterSeries()
Fields
CustomTemplateProperty
The DependencyProperty for CustomTemplate property.
Declaration
public static readonly DependencyProperty CustomTemplateProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
PointHeightProperty
The DependencyProperty for PointHeight property.
Declaration
public static readonly DependencyProperty PointHeightProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
PointWidthProperty
The DependencyProperty for PointWidth property.
Declaration
public static readonly DependencyProperty PointWidthProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
StrokeProperty
The DependencyProperty for Stroke property.
Declaration
public static readonly DependencyProperty StrokeProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Properties
CustomTemplate
Gets or sets the template to customize the appearance of scatter series.
Declaration
public DataTemplate CustomTemplate { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DataTemplate | It accepts Microsoft.UI.Xaml.DataTemplate value. |
PointHeight
Gets or sets a value that defines the height of the scatter segment size.
Declaration
public double PointHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It accepts double values and its default value is 20. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:ScatterSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
PointHeight = "30"/>
</chart:SfCartesianChart>
PointWidth
Gets or sets a value that defines the width of the scatter segment size.
Declaration
public double PointWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It accepts double values and its default value is 20. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:ScatterSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
PointWidth = "30"/>
</chart:SfCartesianChart>
Stroke
Gets or sets a value to customize the stroke appearance of a chart series.
Declaration
public Brush Stroke { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Media.Brush | It accepts Microsoft.UI.Xaml.Media.Brush values and its default value is null. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:ScatterSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
Stroke = "Red"
StrokeWidth = "3"/>
</chart:SfCartesianChart>