Class ChartIndicator
Inheritance
Namespace: Syncfusion.EJ2.Charts
Assembly: Syncfusion.EJ2.dll
Syntax
public class ChartIndicator : EJTagHelper
Constructors
ChartIndicator()
Declaration
public ChartIndicator()
Properties
Animation
Options for customizing the animation of the series.
By default, animation is enabled with a duration of 1000 milliseconds (about 1 second). It can be disabled by setting enable to false
.
The following properties are supported in animation:
enable: If set to true, the series is animated on initial loading.
duration: The duration of the animation in milliseconds.
delay: The delay before the animation starts, in milliseconds.
Declaration
public ChartAnimation Animation { get; set; }
Property Value
Type | Description |
---|---|
ChartAnimation | The default value is null |
BandColor
Configures the settings for customizing the Bollinger Bands in the indicator.
Declaration
public string BandColor { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "rgba(211,211,211,0.25)" |
Close
The data source field that contains the close value. It is applicable for both financial series and technical indicators.
Declaration
public string Close { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "" |
ColorName
The data source field that contains the color mapping value. It is applicable for range color mapping.
Declaration
public string ColorName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
DashArray
Defines the pattern of dashes and gaps used to stroke the lines in Line
type series.
Declaration
public string DashArray { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "" |
DataSource
Specifies the data source for the series. It can be an array of JSON objects, or an instance of DataManager.
Declaration
public object DataSource { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The default value is null |
DPeriod
Defines the period over which price changes determine the %D value in stochastic indicators.
Declaration
public double DPeriod { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 3 |
EnableComplexProperty
This property is used to improve chart performance through data mapping for the series data source.
Declaration
public bool EnableComplexProperty { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
FastPeriod
Sets the fast period to define the MACD line.
Declaration
public double FastPeriod { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 26 |
Field
Defines the field used to compare the current value with previous values.
Declaration
public FinancialDataFields Field { get; set; }
Property Value
Type | Description |
---|---|
FinancialDataFields | The default value is FinancialDataFields.Close |
Fill
Declaration
public string Fill { get; set; }
Property Value
Type |
---|
System.String |
High
The data source field that contains the high value. It is applicable for both financial series and technical indicators.
Declaration
public string High { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "" |
KPeriod
Defines the look-back period for price changes used to calculate the %K value in stochastic indicators.
Declaration
public double KPeriod { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 14 |
Low
The data source field that contains the low value. It is applicable for both financial series and technical indicators.
Declaration
public string Low { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "" |
LowerLine
Defines the appearance of the lower line in technical indicators.
Declaration
public ChartConnector LowerLine { get; set; }
Property Value
Type | Description |
---|---|
ChartConnector | The default value is null |
MacdLine
Defines the appearance of the MACD line in the MACD indicator.
Declaration
public ChartConnector MacdLine { get; set; }
Property Value
Type | Description |
---|---|
ChartConnector | The default value is null |
MacdNegativeColor
Specifies the color for negative bars in the MACD indicator.
Declaration
public string MacdNegativeColor { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "#e74c3d" |
MacdPositiveColor
Specifies the color for positive bars in the MACD indicator.
Declaration
public string MacdPositiveColor { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "#2ecd71" |
MacdType
Defines the type of the MACD (Moving Average Convergence Divergence) indicator.
Declaration
public MacdType MacdType { get; set; }
Property Value
Type | Description |
---|---|
MacdType | The default value is MacdType.Both |
Open
The data source field that contains the open value. It is applicable for both financial series and technical indicators.
Declaration
public string Open { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "" |
OverBought
Specifies the over-bought (threshold) values applicable for RSI and stochastic indicators.
Declaration
public double OverBought { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 80 |
OverSold
Defines the over-sold (threshold) values for RSI and stochastic indicators.
Declaration
public double OverSold { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 20 |
Period
Defines the period over which price changes are considered for trend prediction.
Declaration
public double Period { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 14 |
PeriodLine
Defines the appearance of the period line in technical indicators.
Declaration
public ChartConnector PeriodLine { get; set; }
Property Value
Type | Description |
---|---|
ChartConnector | The default value is null |
PointColorMapping
The data source field that contains the color value of a point. It is applicable for series.
Declaration
public string PointColorMapping { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "" |
Query
Specifies a query to select data from the data source. This property is applicable only when the data source is an ej.DataManager
.
Declaration
public string Query { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "" |
SegmentAxis
Defines the axis along which the line series will be split.
Declaration
public Segment SegmentAxis { get; set; }
Property Value
Type | Description |
---|---|
Segment | The default value is null |
Segments
Specifies a collection of regions used to differentiate a line series.
Declaration
public object Segments { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The default value is null |
SeriesName
Specifies the name of the series to be used for displaying the indicator data.
Declaration
public string SeriesName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "" |
ShowZones
Specifies whether to enable or disable the over-bought and over-sold regions.
Declaration
public bool ShowZones { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is true |
SlowPeriod
Sets the slow period for defining the MACD line.
Declaration
public double SlowPeriod { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 12 |
StandardDeviation
Sets the standard deviation values used to define the upper and lower Bollinger Bands.
Declaration
public double StandardDeviation { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 2 |
Type
Defines the types of technical indicators. They are: 'Sma' - Predicts the trend using the Simple Moving Average approach. 'Ema' - Predicts the trend using the Exponential Moving Average approach. 'Tma' - Predicts the trend using the Triangular Moving Average approach. 'Atr' - Predicts the trend using the Average True Range approach. 'AccumulationDistribution' - Predicts the trend using the Accumulation Distribution approach. 'Momentum' - Predicts the trend using the Momentum approach. 'Rsi' - Predicts the trend using the Relative Strength Index (RSI) approach. 'Macd' - Predicts the trend using the Moving Average Convergence Divergence (MACD) approach. 'Stochastic' - Predicts the trend using the Stochastic Oscillator approach. 'BollingerBands' - Predicts the trend using the Bollinger Bands approach.
Declaration
public TechnicalIndicators Type { get; set; }
Property Value
Type | Description |
---|---|
TechnicalIndicators | The default value is TechnicalIndicators.Sma |
UpperLine
Defines the appearance of the upper line in technical indicators.
Declaration
public ChartConnector UpperLine { get; set; }
Property Value
Type | Description |
---|---|
ChartConnector | The default value is null |
Visible
If set to true
, the series will be visible. If set to false
, the series will be hidden.
Declaration
public bool Visible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is true |
Volume
Defines the data source field that contains the volume value in candle charts. It is applicable for both financial series and technical indicators.
Declaration
public string Volume { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "" |
Width
The stroke width for the series, applicable only for Line
type series.
It also represents the stroke width of the signal lines in technical indicators.
Declaration
public double Width { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 1 |
XAxisName
The name of the horizontal axis associated with the series. It requires axes
of the chart.
It is applicable for series and technical indicators.
Declaration
public string XAxisName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
XName
The data source field that contains the x value. It is applicable to both series and technical indicators.
Declaration
public string XName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "" |
YAxisName
The name of the vertical axis associated with the series. It requires axes
of the chart.
It is applicable for series and technical indicators.
Declaration
public string YAxisName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |