Class CandleSeries
To render a candle chart, create an instance of CandleSeries class and add it to Series collection property and set the required properties.
Inheritance
Inherited Members
Namespace: Syncfusion.SfChart.XForms
Assembly: Syncfusion.SfChart.XForms.dll
Syntax
public class CandleSeries : HiLoOpenCloseSeries, IThemeElement
Remarks
CandleSeries requires ItemsSource, XBindingPath, High, Low, Open and Close properties to be set to render the chart. This series also requires x-axis and y-axis to be explicitly set either using PrimaryAxis and SecondaryAxis or XAxis and YAxis.
Examples
SfChart chart = new SfChart();
chart.PrimaryAxis = new NumericalAxis();
chart.SecondaryAxis = new NumericalAxis();
CandleSeries candleSeries = new CandleSeries();
ObservableCollection<ChartDataPoint> Data = new ObservableCollection<ChartDataPoint>
{
new ChartDataPoint(1, 30,35,20,25),
new ChartDataPoint(2, 90,100,10,20),
new ChartDataPoint(3, 20,90,10,80),
new ChartDataPoint(5, 10,0,80,70)
};
series.ItemsSource = Data;
chart.Series.Add(candleSeries);
Constructors
CandleSeries()
Declaration
public CandleSeries()
Fields
EnableSolidCandlesProperty
Gets or sets a value that indicates whether the solid candles have to be enabled. This is a bindable property.
Declaration
public static readonly BindableProperty EnableSolidCandlesProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
StrokeColorProperty
Gets or sets the stroke color to customize the appearance of CandleSeries. This is a bindable property.
Declaration
public static readonly BindableProperty StrokeColorProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Properties
EnableSolidCandles
Gets or sets a value indicating whether to enable solid candles. This is a bindable property.
Declaration
public bool EnableSolidCandles { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | This property takes the bool value. |
StrokeColor
Gets or sets the stroke color to customize the appearance of CandleSeries. This is a bindable property.
Declaration
public Color StrokeColor { get; set; }
Property Value
Type | Description |
---|---|
Xamarin.Forms.Color | This property takes the Xamarin.Forms.Color value. |