Learning jqPlot
上QQ阅读APP看书,第一时间看更新

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.