Trendlines
Trendlines are dynamic indicators that automatically reveal the overarching trends within your series data. These trendlines are defined as a special type of series linked to the main series by name.
Trendline series use the data from the main series. When the main series employs aggregates, which is common for date series, the trendlines align with the aggregated data. For instance, when using a sum aggregate, the trendline illustrates the trends for the sum within each category.
Trendline Types
The Chart supports the following fundamental types of trendlines:
- Linear Trendline
- Moving Average Trendline
- Exponential Trendline
- Logarithmic Trendline
- Power Trendline
- Polynomial Trendline
Supported Series Types
Trendlines are supported for the following chart types:
- Area
- Bar
- BoxPlot
- Candlestick
- Column
- Line
- OHLC
- RangeArea
- RangeColumn
- Scatter
- ScatterLine
Chart Trendlines Parameters
The following table lists Chart Trendlines parameters.
| Parameter | Type | Description |
|---|---|---|
ChartSeriesMarkers.Visible | bool | The visibility of the trendline markers. |
ChartSeries.For | string | The name of the parent series of the trendline. |
ChartSeriesTrendline | object | The trendline configuration options. |
ChartSeriesTrendlineForecast | object | The trendline forecast settings. By default, the trendline does not display a forecast. |
ChartSeriesTrendlineForecast.Before | int | The number of intervals to extend the trendline before the first data point. |
ChartSeriesTrendlineForecast.After | int | The number of intervals to extend the trendline after the last data point. |
ChartSeriesTrendline.Period | int | The number of intervals to take when calculating averages. The value must be an integer greater than 2. |
Type | ChartSeriesType enum | The type of the series. |
Linear Trendline
Use the Linear Trendline to visualize the rise or decline of a specific quantity over time.
Linear trendline in scatter line Chart series
Moving Average Trendline
Use the Moving Average Trendline to smooth out data fluctuations. This trendline computes and visualizes an average of all data points over a specified period. By default, this period is set to two chart intervals.
Line Chart with a moving average trendline
Exponential Trendline
Use the Exponential Trendline to visualize data with rapidly accelerating growth or decay over time. This trendline helps you to emphasize trends that follow an exponential pattern, and it requires positive Y values.
Chart with an Exponential Trendline
Logarithmic Trendline
Use the Logarithmic Trendline to visualize data with rapid initial growth that slows over time or vice versa. This trendline emphasizes trends with a logarithmic pattern, and it requires positive X values.
Chart with a Logarithmic Trendline
Power Trendline
Use the Power Trendline to visualize data that follows a power-law relationship, indicating that one variable's change is proportional to a power of another variable. This trendline helps you to highlight trends where the rate of change isn't constant. It requires positive Y and X values.
Chart with a Power Trendline
Polynomial Trendline
Use the Polynomial Trendline to visualize complex data patterns not fitting the other trendlines. This trendline fits a polynomial equation to the data points, allowing for a more flexible representation of trends with multiple turning points.
Chart with a Polynomial Trendline