Class ChartTrendline
Inheritance
Namespace: Syncfusion.EJ2.Charts
Assembly: Syncfusion.EJ2.dll
Syntax
public class ChartTrendline : EJTagHelper
Constructors
ChartTrendline()
Declaration
public ChartTrendline()
Properties
Animation
Options to customize the animation for trendlines.
Declaration
public object Animation { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The default value is null |
BackwardForecast
Defines the period by which the trend is to be backward forecasted.
Declaration
public double BackwardForecast { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 0 |
DashArray
Configures the pattern of dashes and gaps in the trendline stroke using the dashArray
property.
Declaration
public string DashArray { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "" |
EnableTooltip
Enables or disables the tooltip for the trendline using the enableTooltip
property. By default, it is set to true.
Declaration
public bool EnableTooltip { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is true |
Fill
The fill color for the trendline, which accepts values in hex or rgba as valid CSS color strings.
Declaration
public string Fill { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "" |
ForwardForecast
Defines the period by which the trend must be forward forecasted.
Declaration
public double ForwardForecast { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 0 |
Intercept
Specifies the intercept value of the trendline.
Declaration
public double Intercept { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is Double.NaN |
LegendShape
The legendShape
property defines the shape used to represent the trendline in the chart legend.
Declaration
public LegendShape LegendShape { get; set; }
Property Value
Type | Description |
---|---|
LegendShape | The default value is LegendShape.SeriesType |
Marker
Options for customizing the markers for trendlines, including shape, size, color, and other visual aspects.
Declaration
public ChartMarkerSettings Marker { get; set; }
Property Value
Type | Description |
---|---|
ChartMarkerSettings | The default value is null |
Name
The name
property is used to assign a descriptive name to the trendline, which will be displayed in the chart as a legend.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "" |
Period
Defines the period, the price changes over which will be considered to predict the moving average trendline.
Declaration
public double Period { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 2 |
PolynomialOrder
Defines the polynomial order of the polynomial trendline.
Declaration
public double PolynomialOrder { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 2 |
Type
Defines the type of trendline used in the series. Available types are: Linear - A straight line that shows the general direction of data. Exponential - A curve that fits data with exponential growth or decay. Polynomial - A curve that fits data with a polynomial function. Power - A curve that represents data with a power function. Logarithmic - A curve that fits data with a logarithmic scale. MovingAverage - A trendline that smoothens data using a moving average calculation.
Declaration
public TrendlineTypes Type { get; set; }
Property Value
Type | Description |
---|---|
TrendlineTypes | The default value is TrendlineTypes.Linear |
Visible
The visible
property controls the display of the trendline. If set to true, the trendline will be rendered on the chart. If set to false, the trendline will be hidden.
Declaration
public bool Visible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is true |
Width
Defines the width of the trendline.
Declaration
public double Width { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 1 |