Skip to main content

FinancialOverlayRenderContext Struct

Definition​

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

Provides financial chart coordinates and brushes to overlay series.

public struct FinancialOverlayRenderContext

Inheritance: ValueType -> FinancialOverlayRenderContext

Constructors​

NameDescription
FinancialOverlayRenderContextNo summary available.

FinancialOverlayRenderContext Constructor​

public FinancialOverlayRenderContext(Avalonia.Controls.Charts.FinancialChart chart, Avalonia.Media.DrawingContext drawingContext, Avalonia.Rect plotArea, System.Collections.Generic.IReadOnlyList<Avalonia.Controls.Charts.FinancialPoint> data, System.Collections.Generic.IReadOnlyDictionary<DateTime, int> dateIndexMap, double minPrice, double maxPrice, Avalonia.Media.IBrush fillBrush, Avalonia.Media.IBrush strokeBrush, int seriesIndex, Func<double, double> valueToY)

Parameters​

chart Avalonia.Controls.Charts.FinancialChart

drawingContext Avalonia.Media.DrawingContext

plotArea Avalonia.Rect

data System.Collections.Generic.IReadOnlyList<Avalonia.Controls.Charts.FinancialPoint>

dateIndexMap System.Collections.Generic.IReadOnlyDictionary<DateTime, int>

minPrice double

maxPrice double

fillBrush Avalonia.Media.IBrush

strokeBrush Avalonia.Media.IBrush

seriesIndex int

valueToY Func<double, double>

Methods​

NameDescription
TryDateToXNo summary available.
TryValueToPointNo summary available.
ValueToYConverts a price value to a Y coordinate.

TryDateToX Method​

public bool TryDateToX(DateTime date, double& x)

Parameters​

date DateTime

x double&

Returns​

bool

TryValueToPoint Method​

public bool TryValueToPoint(DateTime date, double value, Avalonia.Point& point)

Parameters​

date DateTime

value double

point Avalonia.Point&

Returns​

bool

ValueToY Method​

Converts a price value to a Y coordinate.

public double ValueToY(double value)

Parameters​

value double

Returns​

double

Properties​

NameDescription
ChartGets the chart that owns the overlay.
DataGets the ordered financial data used by the chart.
DateIndexMapGets the date-to-index map used by the financial chart.
DrawingContextGets the drawing context for the current render pass.
FillBrushGets the resolved fill brush for the overlay series.
MaxPriceGets the maximum price currently visible in the chart.
MinPriceGets the minimum price currently visible in the chart.
PlotAreaGets the chart plot area.
SeriesIndexGets the series index in the financial chart series collection.
SlotWidthGets the width of one financial data slot.
StrokeBrushGets the resolved stroke brush for the overlay series.

Chart Property​

Gets the chart that owns the overlay.

public Avalonia.Controls.Charts.FinancialChart Chart { get; set; }

Data Property​

Gets the ordered financial data used by the chart.

public System.Collections.Generic.IReadOnlyList<Avalonia.Controls.Charts.FinancialPoint> Data { get; set; }

DateIndexMap Property​

Gets the date-to-index map used by the financial chart.

public System.Collections.Generic.IReadOnlyDictionary<DateTime, int> DateIndexMap { get; set; }

DrawingContext Property​

Gets the drawing context for the current render pass.

public Avalonia.Media.DrawingContext DrawingContext { get; set; }

FillBrush Property​

Gets the resolved fill brush for the overlay series.

public Avalonia.Media.IBrush FillBrush { get; set; }

MaxPrice Property​

Gets the maximum price currently visible in the chart.

public double MaxPrice { get; set; }

MinPrice Property​

Gets the minimum price currently visible in the chart.

public double MinPrice { get; set; }

PlotArea Property​

Gets the chart plot area.

public Avalonia.Rect PlotArea { get; set; }

SeriesIndex Property​

Gets the series index in the financial chart series collection.

public int SeriesIndex { get; set; }

SlotWidth Property​

Gets the width of one financial data slot.

public double SlotWidth { get; set; }

StrokeBrush Property​

Gets the resolved stroke brush for the overlay series.

public Avalonia.Media.IBrush StrokeBrush { get; set; }