Class CandleSeries
The CandleSeries displays a set of candle used in financial analysis to represent open, high, low, and close values of an asset or security.
Inheritance
Inherited Members
Namespace: Syncfusion.Maui.Toolkit.Charts
Assembly: Syncfusion.Maui.Toolkit.dll
Syntax
public class CandleSeries : HiLoOpenCloseSeries, IDatapointSelectionDependent, ITooltipDependent, IDataTemplateDependent, IDrawCustomLegendIcon
Remarks
To render a series, create an instance of CandleSeries class, and add it to the Series collection.
It provides options for Fill, PaletteBrushes, StrokeWidth, Stroke, 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 CandleSeries class, and also refer TooltipBehavior 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:CategoryAxis/>
</chart:SfCartesianChart.XAxes>
<chart:SfCartesianChart.YAxes>
<chart:NumericalAxis/>
</chart:SfCartesianChart.YAxes>
<chart:CandleSeries
ItemsSource="{Binding Data}"
XBindingPath="XValue"
High="High"
Low="Low"
Open="Open"
Close="Close"/>
</chart:SfCartesianChart>
Constructors
CandleSeries()
Declaration
public CandleSeries()
Fields
EnableSolidCandleProperty
Identifies the EnableSolidCandle bindable property.
Declaration
public static readonly BindableProperty EnableSolidCandleProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
Indicates whether solid candles should be enabled in the candle series.
StrokeProperty
Identifies the Stroke bindable property.
Declaration
public static readonly BindableProperty StrokeProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
Defines the stroke brush used for the outline of the candle series.
Properties
EnableSolidCandle
Gets or sets a value indicating a whether enable solid candles.
Declaration
public bool EnableSolidCandle { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | It accepts the |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:CandleSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
High="High"
Low="Low"
Open="Open"
Close="Close"
EnableSolidCandles="True"/>
</chart:SfCartesianChart>
Stroke
Gets or sets the stroke to the candle data point.
Declaration
public Brush Stroke { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.Brush | It accept the Microsoft.Maui.Controls.Brush values and its default value is null |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:CandleSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
High="High"
Low="Low"
Open="Open"
Close="Close"
Stroke="Red" />
</chart:SfCartesianChart>
Methods
CreateSegment()
Creates and initializes a new chart segment for the chart.
Declaration
protected override ChartSegment CreateSegment()
Returns
Type |
---|
ChartSegment |