menu

ASP.NET Core - EJ2

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ChartTrendlineBuilder - ASP.NETCore-EJ2 API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ChartTrendlineBuilder

    Inheritance
    System.Object
    Syncfusion.EJ2.ControlBuilder
    ChartTrendlineBuilder
    Namespace: Syncfusion.EJ2.Charts
    Assembly: Syncfusion.EJ2.dll
    Syntax
    public class ChartTrendlineBuilder : ControlBuilder

    Constructors

    ChartTrendlineBuilder()

    Declaration
    public ChartTrendlineBuilder()

    ChartTrendlineBuilder(List<ChartTrendline>)

    Declaration
    public ChartTrendlineBuilder(List<ChartTrendline> collection)
    Parameters
    Type Name Description
    System.Collections.Generic.List<ChartTrendline> collection

    Methods

    Accessibility(ChartAccessibility)

    Options to improve accessibility for chart trendline elements.

    Declaration
    public ChartTrendlineBuilder Accessibility(ChartAccessibility accessibility)
    Parameters
    Type Name Description
    ChartAccessibility accessibility
    Returns
    Type
    ChartTrendlineBuilder

    Accessibility(Action<ChartAccessibilityBuilder>)

    Declaration
    public ChartTrendlineBuilder Accessibility(Action<ChartAccessibilityBuilder> accessibility)
    Parameters
    Type Name Description
    System.Action<ChartAccessibilityBuilder> accessibility
    Returns
    Type
    ChartTrendlineBuilder

    Add()

    Declaration
    public void Add()

    Animation(Object)

    Options to customize the animation for trendlines.

    Declaration
    public ChartTrendlineBuilder Animation(object animation)
    Parameters
    Type Name Description
    System.Object animation
    Returns
    Type
    ChartTrendlineBuilder

    BackwardForecast(Double)

    Defines the period by which the trend is to be backward forecasted.

    Declaration
    public ChartTrendlineBuilder BackwardForecast(double backwardForecast)
    Parameters
    Type Name Description
    System.Double backwardForecast
    Returns
    Type
    ChartTrendlineBuilder

    DashArray(String)

    Configures the pattern of dashes and gaps in the trendline stroke using the dashArray property.

    Declaration
    public ChartTrendlineBuilder DashArray(string dashArray)
    Parameters
    Type Name Description
    System.String dashArray
    Returns
    Type
    ChartTrendlineBuilder

    EnableTooltip(Boolean)

    Enables or disables the tooltip for the trendline using the enableTooltip property. By default, it is set to true.

    Declaration
    public ChartTrendlineBuilder EnableTooltip(bool enableTooltip)
    Parameters
    Type Name Description
    System.Boolean enableTooltip
    Returns
    Type
    ChartTrendlineBuilder

    Fill(String)

    The fill color for the trendline, which accepts values in hex or rgba as valid CSS color strings.

    Declaration
    public ChartTrendlineBuilder Fill(string fill)
    Parameters
    Type Name Description
    System.String fill
    Returns
    Type
    ChartTrendlineBuilder

    ForwardForecast(Double)

    Defines the period by which the trend must be forward forecasted.

    Declaration
    public ChartTrendlineBuilder ForwardForecast(double forwardForecast)
    Parameters
    Type Name Description
    System.Double forwardForecast
    Returns
    Type
    ChartTrendlineBuilder

    Intercept(Double)

    Specifies the intercept value of the trendline.

    Declaration
    public ChartTrendlineBuilder Intercept(double intercept)
    Parameters
    Type Name Description
    System.Double intercept
    Returns
    Type
    ChartTrendlineBuilder

    LegendShape(LegendShape)

    The legendShape property defines the shape used to represent the trendline in the chart legend.

    Declaration
    public ChartTrendlineBuilder LegendShape(LegendShape legendShape)
    Parameters
    Type Name Description
    LegendShape legendShape
    Returns
    Type
    ChartTrendlineBuilder

    Marker(ChartMarkerSettings)

    Options for customizing the markers for trendlines, including shape, size, color, and other visual aspects.

    Declaration
    public ChartTrendlineBuilder Marker(ChartMarkerSettings marker)
    Parameters
    Type Name Description
    ChartMarkerSettings marker
    Returns
    Type
    ChartTrendlineBuilder

    Marker(Action<ChartMarkerSettingsBuilder>)

    Declaration
    public ChartTrendlineBuilder Marker(Action<ChartMarkerSettingsBuilder> marker)
    Parameters
    Type Name Description
    System.Action<ChartMarkerSettingsBuilder> marker
    Returns
    Type
    ChartTrendlineBuilder

    Name(String)

    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 ChartTrendlineBuilder Name(string name)
    Parameters
    Type Name Description
    System.String name
    Returns
    Type
    ChartTrendlineBuilder

    Period(Double)

    Defines the period, the price changes over which will be considered to predict the moving average trendline.

    Declaration
    public ChartTrendlineBuilder Period(double period)
    Parameters
    Type Name Description
    System.Double period
    Returns
    Type
    ChartTrendlineBuilder

    PolynomialOrder(Double)

    Defines the polynomial order of the polynomial trendline.

    Declaration
    public ChartTrendlineBuilder PolynomialOrder(double polynomialOrder)
    Parameters
    Type Name Description
    System.Double polynomialOrder
    Returns
    Type
    ChartTrendlineBuilder

    Type(TrendlineTypes)

    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 ChartTrendlineBuilder Type(TrendlineTypes type)
    Parameters
    Type Name Description
    TrendlineTypes type
    Returns
    Type
    ChartTrendlineBuilder

    Visible(Boolean)

    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 ChartTrendlineBuilder Visible(bool visible)
    Parameters
    Type Name Description
    System.Boolean visible
    Returns
    Type
    ChartTrendlineBuilder

    Width(Double)

    Defines the width of the trendline.

    Declaration
    public ChartTrendlineBuilder Width(double width)
    Parameters
    Type Name Description
    System.Double width
    Returns
    Type
    ChartTrendlineBuilder
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved