ChartView

StockSharp.Xaml.Charting.Maui

MAUI candlestick chart view with touch gestures. Implements IChart for StockSharp compatibility.

Inherits: GraphicsView

Implements: IChart, IChartBuilder, IThemeableChart, IPersistable, IChartModifierSurface

Properties

Annotations
public List<IAnnotation> Annotations { get; }
value = chartView.Annotations

Gets the annotations collection.

Areas
public List<ChartArea> Areas { get; }
value = chartView.Areas

Gets the chart areas collection for multi-area rendering.

Candles
public CandleDataSeries Candles { get; set; }
value = chartView.Candles
chartView.Candles = value

The candle data to display.

ChartThemeModel
public ChartTheme ChartThemeModel { get; set; }
value = chartView.ChartThemeModel
chartView.ChartThemeModel = value

Gets or sets the chart theme.

DrawStyle
public ChartDrawStyle DrawStyle { get; set; }
value = chartView.DrawStyle
chartView.DrawStyle = value

The chart draw style.

Indicators
public List<ValueTuple<IReadOnlyList<decimal?>, ChartColor, string>> Indicators { get; }
value = chartView.Indicators

Indicator series to display.

Modifiers
public ModifierGroup Modifiers { get; }
value = chartView.Modifiers

Gets the modifier group for controlling chart interactions.

ShowCrosshair
public bool ShowCrosshair { get; set; }
value = chartView.ShowCrosshair
chartView.ShowCrosshair = value

Whether to show the crosshair.

ShowLegendBool
public bool ShowLegendBool { get; set; }
value = chartView.ShowLegendBool
chartView.ShowLegendBool = value

Whether to show the legend (local property).

ShowVolume
public bool ShowVolume { get; set; }
value = chartView.ShowVolume
chartView.ShowVolume = value

Whether to show the volume subplot.

StartIndex
public int StartIndex { get; set; }
value = chartView.StartIndex
chartView.StartIndex = value

The starting index of visible candles.

VisibleCandleCount
public int VisibleCandleCount { get; set; }
value = chartView.VisibleCandleCount
chartView.VisibleCandleCount = value

The number of candles visible in the viewport.

Methods

AddAnnotation
public void AddAnnotation(IAnnotation annotation)
chartView.AddAnnotation(annotation)

Adds an annotation.

AddElementToArea
public void AddElementToArea(ChartArea area, IChartElement element)
chartView.AddElementToArea(area, element)

Internal method to add element to internal model area.

AddIndicator
public void AddIndicator(IReadOnlyList<decimal?> values, ChartColor color, string name)
chartView.AddIndicator(values, color, name)

Adds an indicator series.

AddOscillator
public void AddOscillator(OscillatorPane pane)
chartView.AddOscillator(pane)

Adds an oscillator sub-pane (RSI, MACD, …) below the price chart.

ClearAnnotations
public void ClearAnnotations()
chartView.ClearAnnotations()

Clears all annotations.

ClearIndicators
public void ClearIndicators()
chartView.ClearIndicators()

Clears all indicators.

ClearOscillators
public void ClearOscillators()
chartView.ClearOscillators()

Clears all oscillator sub-panes.

CreateArea
public ChartArea CreateArea(string title, double height, bool isRelativeHeight)
result = chartView.CreateArea(title, height, isRelativeHeight)

Creates a new chart area.

FitAll
public void FitAll()
chartView.FitAll()

Fits all candles in view.

ScreenToData
public ValueTuple<double, decimal> ScreenToData(ChartPoint screenPoint)
result = chartView.ScreenToData(screenPoint)

Maps a chart-local screen point to data coordinates (fractional candle index and price), or (NaN, 0) when the point is outside the price area. Used by drawing tools.

ScrollToEnd
public void ScrollToEnd()
chartView.ScrollToEnd()

Scrolls to the end of the data (most recent candles).

ScrollToStart
public void ScrollToStart()
chartView.ScrollToStart()

Scrolls to the beginning of the data (oldest candles).

SetTheme
public void SetTheme(ChartThemeType themeType)
chartView.SetTheme(themeType)

Sets the chart theme by type.

ZoomIn
public void ZoomIn()
chartView.ZoomIn()

Zooms in (shows fewer candles).

ZoomOut
public void ZoomOut()
chartView.ZoomOut()

Zooms out (shows more candles).

Events

RangeChanged
public event EventHandler<ChartRangeChangedEventArgs> RangeChanged
chartView.RangeChanged += handler

Raised when the visible range changes.