Class FastLineSeries
The FastLineSeries is a special kind of line series that can render a collection with a large number of data points.
Inherited Members
Namespace: Syncfusion.Maui.Charts
Assembly: Syncfusion.Maui.Charts.dll
Syntax
public class FastLineSeries : XYDataSeries, IDatapointSelectionDependent, ITooltipDependent, IDataTemplateDependent, IDrawCustomLegendIcon
Remarks
To render a series, create an instance of FastLineSeries class, and add it to the Series collection.
It provides options for Fill, PaletteBrushes, StrokeWidth, StrokeDashArray, and Opacity to customize the appearance.
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 FastLineSeries 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 FastLineSeries 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:FastLineSeries
ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"/>
</chart:SfCartesianChart.Series>
</chart:SfCartesianChart>
Constructors
FastLineSeries()
Initializes a new instance of the FastLineSeries class.
Declaration
public FastLineSeries()
Fields
EnableAntiAliasingProperty
Identifies the EnableAntiAliasing bindable property.
Declaration
public static readonly BindableProperty EnableAntiAliasingProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
StrokeDashArrayProperty
Identifies the StrokeDashArray bindable property.
Declaration
public static readonly BindableProperty StrokeDashArrayProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Properties
EnableAntiAliasing
Gets or sets a value indicating whether to enable smooth line drawing for FastLineSeries.
Declaration
public bool EnableAntiAliasing { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | It accepts bool values and the default value is false. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:FastLineSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
EnableAntiAliasing ="True" />
</chart:SfCartesianChart>
StrokeDashArray
Gets or sets the stroke dash array to customize the appearance of stroke.
Declaration
public DoubleCollection StrokeDashArray { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.DoubleCollection | It accepts the Microsoft.Maui.Controls.DoubleCollection value and the default value is null. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:FastLineSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
StrokeDashArray="5,3"
Stroke = "Red" />
</chart:SfCartesianChart>
Methods
CreateSegment()
Declaration
protected override ChartSegment CreateSegment()
Returns
Type |
---|
ChartSegment |
Overrides
GetDataPointIndex(Single, Single)
Methods to get the index of data point.
Declaration
public override int GetDataPointIndex(float pointX, float pointY)
Parameters
Type | Name | Description |
---|---|---|
System.Single | pointX | |
System.Single | pointY |
Returns
Type |
---|
System.Int32 |