Skip to main content

MovingAverageIndicatorBase Class

Definition

Assembly:Avalonia.Controls.Charts
Package:Avalonia.Controls.Charts

Shared orchestration for moving-average indicators that differ only by their averaging formula.

public class MovingAverageIndicatorBase

Inheritance: object -> AvaloniaObject -> ChartTechnicalIndicator -> MovingAverageIndicatorBase

Methods

NameDescription
ComputeCalled when the target series data updates to recalculate the indicator values.
RenderRenders the indicator into the specified plot area.
GetLegendItemsGets the legend items that represent this indicator. Inherited from ChartTechnicalIndicator.
Bind (8 overloads)Binds a Avalonia.AvaloniaProperty to an Avalonia.Data.BindingBase. Inherited from AvaloniaObject.
CheckAccessReturns a value indicating whether the current thread is the UI thread. Inherited from AvaloniaObject.
ClearValue (4 overloads)Clears a Avalonia.AvaloniaProperty's local value. Inherited from AvaloniaObject.
CoerceValueCoerces the specified Avalonia.AvaloniaProperty. Inherited from AvaloniaObject.
EqualsCompares two objects using reference equality. Inherited from AvaloniaObject.
GetBaseValueInherited from AvaloniaObject.
GetHashCodeGets the hash code for the object. Inherited from AvaloniaObject.
GetValue (3 overloads)Gets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject.
IsAnimatingChecks whether a Avalonia.AvaloniaProperty is animating. Inherited from AvaloniaObject.
IsSetChecks whether a Avalonia.AvaloniaProperty is set on this object. Inherited from AvaloniaObject.
SetCurrentValue (2 overloads)Sets the value of a dependency property without changing its value source. Inherited from AvaloniaObject.
SetValue (3 overloads)Sets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject.
VerifyAccessChecks that the current thread is the UI thread and throws if not. Inherited from AvaloniaObject.

Compute Method

Called when the target series data updates to recalculate the indicator values.

public void Compute()

Render Method

Renders the indicator into the specified plot area.

public void Render(Avalonia.Media.DrawingContext context, Avalonia.Rect plotArea)

Parameters

context Avalonia.Media.DrawingContext

The drawing context for the current render pass.

plotArea Avalonia.Rect

The plot area in chart coordinates.

Properties

NameDescription
PeriodGets or sets the period used for the moving-average calculation.
IsVisibleGets or sets a value indicating whether this indicator is visible. Inherited from ChartTechnicalIndicator.
StrokeGets or sets the brush used for the main indicator line. Inherited from ChartTechnicalIndicator.
StrokeDashStyleGets or sets the dash style for the indicator line. Inherited from ChartTechnicalIndicator.
StrokeLineCapGets or sets the line cap style for the indicator line. Inherited from ChartTechnicalIndicator.
StrokeLineJoinGets or sets the line join style for the indicator line. Inherited from ChartTechnicalIndicator.
StrokeThicknessGets or sets the thickness of the indicator stroke. Inherited from ChartTechnicalIndicator.
TargetSeriesGets or sets the target series this indicator is based on. Inherited from ChartTechnicalIndicator.
TitleGets or sets the title shown in the legend and tooltips. Inherited from ChartTechnicalIndicator.
DispatcherReturns the Avalonia.AvaloniaObject.Dispatcher that this Avalonia.AvaloniaObject is associated with. Inherited from AvaloniaObject.
ItemInherited from AvaloniaObject.

Period Property

Gets or sets the period used for the moving-average calculation.

public int Period { get; set; }

Fields

PeriodProperty Field

Identifies the Avalonia.Controls.Charts.MovingAverageIndicatorBase.Period Avalonia property.

public Avalonia.StyledProperty<int> PeriodProperty

Events

NameDescription
PropertyChangedRaised when a Avalonia.AvaloniaProperty value changes on this object. Inherited from AvaloniaObject.