Class FinancialSeriesBase
An abstract class in the chart API that serves as a base for CandleSeries and HiLoOpenCloseSeries. It provides common options and functionality for these types of financial chart series.
Inheritance
Inherited Members
Namespace: Syncfusion.UI.Xaml.Charts
Assembly: Syncfusion.Chart.WinUI.dll
Syntax
public abstract class FinancialSeriesBase : CartesianSeries, INotifyPropertyChanged, ISegmentSpacing
Constructors
FinancialSeriesBase()
Initializes a new instance of the FinancialSeriesBase class with empty value collections.
Declaration
public FinancialSeriesBase()
Fields
BearishBrushProperty
The DependencyProperty for BearishBrush property.
Declaration
public static readonly DependencyProperty BearishBrushProperty
Field Value
| Type |
|---|
| Microsoft.UI.Xaml.DependencyProperty |
BullishBrushProperty
The DependencyProperty for BullishBrush property.
Declaration
public static readonly DependencyProperty BullishBrushProperty
Field Value
| Type |
|---|
| Microsoft.UI.Xaml.DependencyProperty |
CloseProperty
The DependencyProperty for Close property.
Declaration
public static readonly DependencyProperty CloseProperty
Field Value
| Type |
|---|
| Microsoft.UI.Xaml.DependencyProperty |
HighProperty
The DependencyProperty for High property.
Declaration
public static readonly DependencyProperty HighProperty
Field Value
| Type |
|---|
| Microsoft.UI.Xaml.DependencyProperty |
LowProperty
The DependencyProperty for Low property.
Declaration
public static readonly DependencyProperty LowProperty
Field Value
| Type |
|---|
| Microsoft.UI.Xaml.DependencyProperty |
OpenProperty
The DependencyProperty for Open property.
Declaration
public static readonly DependencyProperty OpenProperty
Field Value
| Type |
|---|
| Microsoft.UI.Xaml.DependencyProperty |
SegmentSpacingProperty
The DependencyProperty for SegmentSpacing property.
Declaration
public static readonly DependencyProperty SegmentSpacingProperty
Field Value
| Type |
|---|
| Microsoft.UI.Xaml.DependencyProperty |
SegmentWidthProperty
The DependencyProperty for SegmentWidth property.
Declaration
public static readonly DependencyProperty SegmentWidthProperty
Field Value
| Type |
|---|
| Microsoft.UI.Xaml.DependencyProperty |
Properties
BearishBrush
Gets or sets the brush to be used for bearish points in a financial chart. It is typically used in conjunction with a CandleSeries or HiLoOpenCloseSeries series to visually represent negative price movements or bearish market conditions.
Declaration
public Brush BearishBrush { get; set; }
Property Value
| Type | Description |
|---|---|
| Microsoft.UI.Xaml.Media.Brush | The default value is a Microsoft.UI.Xaml.Media.SolidColorBrush initialized with |
Examples
<chart:SfCartesianChart>
<chart:HiLoOpenCloseSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
High="High"
Low="Low"
Open="Open"
Close="Close"
BearishBrush="DeepPink"/>
</chart:SfCartesianChart>
SfCartesianChart chart = new SfCartesianChart();
ViewModel viewModel = new ViewModel();
HiLoOpenCloseSeries series = new HiLoOpenCloseSeries()
{
ItemsSource = viewModel.Data,
XBindingPath = "XValue",
High = "High",
Low = "Low",
Open = "Open",
Close = "Close",
BearishBrush = new SolidColorBrush(Colors.DeepPink)
};
chart.Series.Add(series);
BullishBrush
Gets or sets the brush to be used for bullish points in a financial chart. It is typically used in conjunction with a CandleSeries or HiLoOpenCloseSeries series to visually represent positive price movements or bullish market conditions.
Declaration
public Brush BullishBrush { get; set; }
Property Value
| Type | Description |
|---|---|
| Microsoft.UI.Xaml.Media.Brush | The default value is a Microsoft.UI.Xaml.Media.SolidColorBrush initialized with |
Examples
<chart:SfCartesianChart>
<chart:CandleSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
High="High"
Low="Low"
Open="Open"
Close="Close"
BullishBrush = "DodgerBlue"/>
</chart:SfCartesianChart>
SfCartesianChart chart = new SfCartesianChart();
ViewModel viewModel = new ViewModel();
CandleSeries candleSeries = new CandleSeries()
{
ItemsSource = viewModel.Data,
XBindingPath = "XValue",
High = "High",
Low = "Low",
Open = "Open",
Close = "Close",
BullishBrush = new SolidColorBrush(Colors.DodgerBlue)
};
chart.Series.Add(candleSeries);
Close
Gets or sets the property path bound to the close value of the financial series.
Declaration
public string Close { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The string that represents the property name for the y (close) plotting data, and its default value is null. |
Examples
<chart:SfCartesianChart>
<chart:HiLoOpenCloseSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
High="High"
Low="Low"
Open="Open"
Close="Close"/>
</chart:SfCartesianChart>
SfCartesianChart chart = new SfCartesianChart();
ViewModel viewModel = new ViewModel();
HiLoOpenCloseSeries series = new HiLoOpenCloseSeries()
{
ItemsSource = viewModel.Data,
XBindingPath = "XValue",
High = "High",
Low = "Low",
Open = "Open",
Close = "Close"
};
chart.Series.Add(series);
CloseValues
Gets or sets CloseValues.
Declaration
protected IList<double> CloseValues { get; set; }
Property Value
| Type |
|---|
| System.Collections.Generic.IList<System.Double> |
High
Gets or sets the property path bound to the high value of the financial series.
Declaration
public string High { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The string that represents the property name for the y (high) plotting data, and its default value is null. |
Examples
<chart:SfCartesianChart>
<chart:CandleSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
High="High"
Low="Low"
Open="Open"
Close="Close"/>
</chart:SfCartesianChart>
SfCartesianChart chart = new SfCartesianChart();
ViewModel viewModel = new ViewModel();
CandleSeries candleSeries = new CandleSeries()
{
ItemsSource = viewModel.Data,
XBindingPath = "XValue",
High = "High",
Low = "Low",
Open = "Open",
Close = "Close"
};
chart.Series.Add(candleSeries);
HighValues
Gets or sets HighValues.
Declaration
protected IList<double> HighValues { get; set; }
Property Value
| Type |
|---|
| System.Collections.Generic.IList<System.Double> |
Low
Gets or sets the property path bound to the low value of the financial series.
Declaration
public string Low { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The string that represents the property name for the y (low) plotting data, and its default value is null. |
Examples
<chart:SfCartesianChart>
<chart:HiLoOpenCloseSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
High="High"
Low="Low"
Open="Open"
Close="Close"/>
</chart:SfCartesianChart>
SfCartesianChart chart = new SfCartesianChart();
ViewModel viewModel = new ViewModel();
HiLoOpenCloseSeries series = new HiLoOpenCloseSeries()
{
ItemsSource = viewModel.Data,
XBindingPath = "XValue",
High = "High",
Low = "Low",
Open = "Open",
Close = "Close"
};
chart.Series.Add(series);
LowValues
Gets or sets LowValues.
Declaration
protected IList<double> LowValues { get; set; }
Property Value
| Type |
|---|
| System.Collections.Generic.IList<System.Double> |
Open
Gets or sets the property path bound to the open value of the financial series.
Declaration
public string Open { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The string that represents the property name for the y (open) plotting data, and its default value is null. |
Examples
<chart:SfCartesianChart>
<chart:CandleSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
High="High"
Low="Low"
Open="Open"
Close="Close"/>
</chart:SfCartesianChart>
SfCartesianChart chart = new SfCartesianChart();
ViewModel viewModel = new ViewModel();
CandleSeries candleSeries = new CandleSeries()
{
ItemsSource = viewModel.Data,
XBindingPath = "XValue",
High = "High",
Low = "Low",
Open = "Open",
Close = "Close"
};
chart.Series.Add(candleSeries);
OpenValues
Gets or sets OpenValues.
Declaration
protected IList<double> OpenValues { get; set; }
Property Value
| Type |
|---|
| System.Collections.Generic.IList<System.Double> |
SegmentSpacing
Gets or sets a value to indicate spacing between the data points across the series.
Declaration
public double SegmentSpacing { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double | It accepts values between 0 and 1, and its default value is |
Examples
<chart:SfCartesianChart>
<chart:HiLoOpenCloseSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
High="High"
Low="Low"
Open="Open"
Close="Close"
SegmentSpacing="0.3"/>
</chart:SfCartesianChart>
SfCartesianChart chart = new SfCartesianChart();
ViewModel viewModel = new ViewModel();
HiLoOpenCloseSeries series = new HiLoOpenCloseSeries()
{
ItemsSource = viewModel.Data,
XBindingPath = "XValue",
High = "High",
Low = "Low",
Open = "Open",
Close = "Close",
SegmentSpacing = 0.3
};
chart.Series.Add(series);
SegmentWidth
Gets or sets a value to change the width of the data points across the series.
Declaration
public double SegmentWidth { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double | It accepts values between 0 and 1, and its default value is |
Examples
<chart:SfCartesianChart>
<chart:CandleSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
High="High"
Low="Low"
Open="Open"
Close="Close"
SegmentWidth="0.6"/>
</chart:SfCartesianChart>
SfCartesianChart chart = new SfCartesianChart();
ViewModel viewModel = new ViewModel();
CandleSeries candleSeries = new CandleSeries()
{
ItemsSource = viewModel.Data,
XBindingPath = "XValue",
High = "High",
Low = "Low",
Open = "Open",
Close = "Close",
SegmentWidth = 0.6
};
chart.Series.Add(candleSeries);
WidthFactor
Gets or sets the segment width factor. Defaults to internal spacing logic.
Declaration
protected override double WidthFactor { get; }
Property Value
| Type |
|---|
| System.Double |
Overrides
Methods
AddAdornments(Double, ChartPoint, ChartPoint, ChartPoint, ChartPoint, ChartPoint, ChartPoint, Int32, Double, Boolean)
Creates and updates chart data label adornments for high, low, open, and close values.
Declaration
protected void AddAdornments(double xValue, ChartPoint highPt, ChartPoint lowPt, ChartPoint openStartPt, ChartPoint openEndPoint, ChartPoint closeStartPt, ChartPoint closeEndPoint, int i, double median, bool isBullish)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | xValue | |
| ChartPoint | highPt | |
| ChartPoint | lowPt | |
| ChartPoint | openStartPt | |
| ChartPoint | openEndPoint | |
| ChartPoint | closeStartPt | |
| ChartPoint | closeEndPoint | |
| System.Int32 | i | |
| System.Double | median | |
| System.Boolean | isBullish |
Explicit Interface Implementations
ISegmentSpacing.CalculateSegmentSpacing(Double, Double, Double)
Declaration
double ISegmentSpacing.CalculateSegmentSpacing(double spacing, double Right, double Left)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | spacing | |
| System.Double | Right | |
| System.Double | Left |
Returns
| Type |
|---|
| System.Double |