Class ChartTrendline
Defines the collection of trendlines that are used to predict the trend.
Inherited Members
Namespace: Syncfusion.Blazor.Charts
Assembly: Syncfusion.Blazor.dll
Syntax
public class ChartTrendline : ChartSubComponent, ISubcomponentTracker, IChartElement
Constructors
ChartTrendline()
Declaration
public ChartTrendline()
Properties
AccessibilityDescription
Gets or sets the accessibility description for the ChartTrendline.
Declaration
public string AccessibilityDescription { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts a string that defines the accessibility description for the ChartTrendline. The default value is an empty string. |
Remarks
Use this property to provide an accessibility description for the ChartTrendline.
AccessibilityDescriptionFormat
Gets or sets the format for the accessibility description of the ChartTrendline.
Declaration
public string AccessibilityDescriptionFormat { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts a string that defines the format for the accessibility description of the ChartTrendline. The default value is null. |
Remarks
Use this property to provide a format for the accessibility description of the ChartTrendline. The AccessibilityDescription property is used to provide accessibility information statically. But this AccessibilityDescriptionFormat property allows you to provide dynamic information based on the ChartTrendline data. For example, the format "${series.name} : ${point.x}" displays the series name and x-value of the point in the accessibility description.
AccessibilityRole
Gets or sets the accessibility role for the ChartTrendline.
Declaration
public string AccessibilityRole { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts a string that defines the accessibility role for the ChartTrendline. The default value is null. |
Remarks
Use this property to provide an accessibility role for the ChartTrendline.
Animation
Gets or sets the animation settings for the trendline.
Declaration
public ChartTrendlineAnimation Animation { get; set; }
Property Value
Type | Description |
---|---|
ChartTrendlineAnimation | An instance of ChartTrendlineAnimation that specifies the animation properties for displaying the trendline. |
Remarks
This property allows you to define entry and transition animations for the trendline, enhancing the visual presentation and engagement when the trendline appears on the chart.
BackwardForecast
Gets or sets the backward forecast for the trendline.
Declaration
public double BackwardForecast { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double representing the backward forecast period. |
Remarks
This property is used to define the backward forecast period for the trendline.
DashArray
Gets or sets the dash array pattern for the trendline.
Declaration
public string DashArray { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string that specifies the dash pattern for the trendline. The default value is "0". |
Remarks
The dash array can be used to represent the trendline with different styles, such as dashed or dotted lines.
EnableTooltip
Gets or sets a value indicating whether tooltips are enabled for the trendline.
Declaration
public bool EnableTooltip { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean indicating tooltip visibility. The default value is true. |
Remarks
This property is used to enable or disable tooltips for the trendline.
Fill
Gets or sets the fill color of the trendline.
Declaration
public string Fill { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the fill color. The value must be a valid color string in CSS, formatted as either a hexadecimal or rgba value. The default value is an empty string. |
Remarks
This property is used to define the fill color of the trendline.
Focusable
Gets or sets the accessibility keyboard navigation focus option for the ChartTrendline.
Declaration
public bool Focusable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Accepts the boolean value to enable or disable the keyboard navigation for the ChartTrendline. The default value is true. |
Remarks
Use this property to toggle the keyboard navigation focus for the ChartTrendline.
ForwardForecast
Gets or sets the forward forecast for the trendline.
Declaration
public double ForwardForecast { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double representing the forward forecast period. |
Remarks
This property is used to define the forward forecast period for the trendline.
Intercept
Gets or sets the Y-intercept of the trendline.
Declaration
public double Intercept { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double representing the intercept. The default value is NaN. |
Remarks
This property is used to define the Y-intercept of the trendline.
LegendShape
Gets or sets the shape of the legend associated with the trendline.
Declaration
public LegendShape LegendShape { get; set; }
Property Value
Type | Description |
---|---|
LegendShape | A LegendShape value defining the legend marker shape. |
Remarks
This property is used to define the shape of the legend marker for the trendline.
Marker
Gets or sets the marker settings for the trendline.
Declaration
public ChartTrendlineMarker Marker { get; set; }
Property Value
Type | Description |
---|---|
ChartTrendlineMarker | An instance of ChartTrendlineMarker that defines the marker properties for the trendline. |
Remarks
Use this property to customize the appearance of markers on the trendline, enhancing visual distinction and data point identification through attributes such as size, shape, and color.
Name
Gets or sets the name of the trendline.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the name of the trendline. The default value is an empty string. |
Remarks
Setting the name is useful for identifying the trendline in a chart's legend or for accessibility purposes.
Period
Gets or sets the moving average period for the trendline.
Declaration
public double Period { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double representing the period of the moving average trendline. |
Remarks
This property is used to define the moving average period for the trendline.
PolynomialOrder
Gets or sets the order for polynomial trendline fitting.
Declaration
public double PolynomialOrder { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double representing the polynomial order. The default value is 2. |
Remarks
This property is used to define the order of the polynomial trendline fitting.
Type
Gets or sets the type of the trendline.
Declaration
public TrendlineTypes Type { get; set; }
Property Value
Type | Description |
---|---|
TrendlineTypes | A TrendlineTypes enumeration value that specifies the type of trendline. |
Remarks
Different trendline types, such as linear, exponential, and polynomial, can be used to fit the trend to the underlying data.
Visible
Gets or sets a value indicating whether the trendline is visible.
Declaration
public bool Visible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating the visibility of the trendline. The default value is true. |
Remarks
Use this property to toggle the visibility of the trendline on the chart.
Width
Gets or sets the width of the trendline.
Declaration
public double Width { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double representing the line width. The default value is 1. |
Remarks
This property is used to define the width of the trendline.
Methods
OnInitialized()
Declaration
protected override void OnInitialized()