O'Reilly logo

Learning jqPlot by Scott Gottreu

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understanding trend lines

The next morning with coffee mugs in hand, we set about adding trend lines to some of our existing charts. We decide that we will take our chart with the past twelve months of revenue and profit data and add a trend line.

Trend lines are calculated by taking all the data points on the y axis and picking a path where the number of points on either side of the line are as close to equal as possible. By doing this, jqPlot creates a line that will generally move upward or downward moving from left to right. This allows us to see if our data is moving upwards or downwards over time. Hence, we can see if our data is "trending" up or down.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required