Class MovingAverageTrendline
Represents a moving average trendline that calculates and displays a moving average curve. The moving average trendline smooths data by creating a series of averages over a specified period. This implementation follows the dart trendline.dart logic for moving average calculation.
Inherited Members
Namespace: Syncfusion.Maui.Charts
Assembly: Syncfusion.Maui.Charts.dll
Syntax
public class MovingAverageTrendline : ChartTrendline, ITooltipDependent, IMarkerDependent, ICartesianLegendDependent
Constructors
MovingAverageTrendline()
Declaration
public MovingAverageTrendline()
Fields
PeriodProperty
Identifies the Period bindable property.
Declaration
public static readonly BindableProperty PeriodProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
Properties
Period
Gets or sets the period (number of data points) for the moving average calculation. Valid range is 2 to the number of data points minus 1. Higher periods provide smoother curves but with more lag.
Declaration
public int Period { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The period of the moving average (default is 2). |