Chart Trend Line Setup

Trend lines can be set up for HighCharts charts.

To enable trend line setup, use the trendLine element of the Series items.

Comments

Trend lines can be used for all chart types except for pie and radar charts. If the chart type changes to pie or radar, the trend lines corresponding to data are lost.

Example

Executing the example requires to place Highcharts chart on HTML page. Then place the nested element trendLine in the Series element to set up trend line of chart series:

series: [{
            ...
        trendLine: {
            backwardForecast: 0,
            dashStyle: 'solid',
            forwardForecast: 0,
            lineColor: 'red',
            lineWidth: 1.51181,
            showInLegend: true,
            type: 'logarithmic',
            useAutomaticText: true
        }
    },

After executing the example a tend line is placed on the HTML page containing the chart. Considering the settings, the chart will look as follows:

See also:

HighCharts Improvements | Examples |The HighCharts Chart Allocation on HTML Page | trendLine Element