Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Highcharts have a "trend line" feature?

Tags:

highcharts

Basically, I'm trying to have Highcharts automatically draw a straight line going from the first data point to the last, so that I can see the "overall trend" more easily.

I believe this is called a "trend line" or something, but I have not found anything in the documentation related to that. It is very possible that it still has this feature, however. Does it?

like image 401
user2633291 Avatar asked Sep 20 '13 00:09

user2633291


People also ask

How do you show trends in a line graph?

The direction of the lines on the graph works as a nice metaphor for the data: an upward slope indicates where values have increased and a downward slope indicates where values have decreased. The line's journey across the graph can create patterns that reveal trends in a dataset.

How do you find the trend of a line?

To calculate the trend line for the graph of a linear relationship, find the slope-intercept form of the line, y = mx + b, where x is the independent variable, y is the dependent variable, m is the slope of the line, and b is the y-intercept.

How is a trendline created?

Trend lines can be composed of highs (resistance) or lows (support). To construct a trendline, simply connect either the high prices or low prices on a price chart. The resulting line is the trend line.


2 Answers

As far as I am aware, highcharts does not calculate a regression or trend lines. There are some plugins that you may be able to use. Here is one that i've found, i'm sure there are others: https://github.com/virtualstaticvoid/highcharts_trendline

like image 114
thtsigma Avatar answered Oct 06 '22 23:10

thtsigma


Highcharts does not support this out of the box, but there are some plugins in their gallery that do trend lines.

This one for example (which we have used with success), gives multiple options including linear trend and moving averages: http://www.highcharts.com/plugin-registry/single/16/technical-indicators

UPDATE May 2018:

Highcharts now includes this functionality as part of its core offering.

https://www.highcharts.com/docs/chart-and-series-types/technical-indicator-series

like image 39
Ojen Avatar answered Oct 06 '22 21:10

Ojen