Class ScatterSeries
The ScatterSeries displays a collection of data points represented by a circle of equal size.
Inherited Members
Namespace: Syncfusion.Maui.Charts
Assembly: Syncfusion.Maui.Charts.dll
Syntax
public class ScatterSeries : XYDataSeries, IDatapointSelectionDependent, ITooltipDependent, IDataTemplateDependent, IDrawCustomLegendIcon
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 above a segment. To display the tooltip on a chart, you 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 ShowDataLabels property as true in ScatterSeries class. To customize the chart data labels alignment, placement, and label styles, you need to create an instance of CartesianDataLabelSettings and set to the DataLabelSettings property.
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:SfCartesianChart.Series>
<chart:ScatterSeries
ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
PointHeight="10"
PointWidth="10"/>
</chart:SfCartesianChart.Series>
</chart:SfCartesianChart>
Constructors
ScatterSeries()
Initializes a new instance of the ScatterSeries class.
Declaration
public ScatterSeries()
Fields
PointHeightProperty
Identifies the PointHeight bindable property.
Declaration
public static readonly BindableProperty PointHeightProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
PointWidthProperty
Identifies the PointWidth bindable property.
Declaration
public static readonly BindableProperty PointWidthProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
StrokeProperty
Identifies the Stroke bindable property.
Declaration
public static readonly BindableProperty StrokeProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
TypeProperty
Identifies the Type bindable property.
Declaration
public static readonly BindableProperty TypeProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Properties
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 5. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:ScatterSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
PointHeight = "20"/>
</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 5. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:ScatterSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
PointWidth = "20"/>
</chart:SfCartesianChart>
Stroke
Gets or sets a value to customize the stroke appearance of the scatter series.
Declaration
public Brush Stroke { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.Brush | It accepts Microsoft.Maui.Controls.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" />
</chart:SfCartesianChart>
Type
Gets or sets a value that indicates the shape of the scatter series.
Declaration
public ShapeType Type { get; set; }
Property Value
Type | Description |
---|---|
ShapeType | It accepts ShapeType values and its default value is Circle. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:ScatterSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
ShapeType = "Diamond"/>
</chart:SfCartesianChart>
Methods
CreateSegment()
Declaration
protected override ChartSegment CreateSegment()
Returns
Type |
---|
ChartSegment |