Class pvc.options.varia.PlotTrending
Constructor Attributes | Constructor Name and Description |
---|---|
The options documentation class for
specifying trending options for a plot.
|
Field Attributes | Field Name and Description |
---|---|
A description to show next to the trended data.
|
|
The type of trend to perform on the data of the associated plot.
|
Class Detail
pvc.options.varia.PlotTrending
The options documentation class for
specifying trending options for a plot.
Each trend type may define additional options. Specifying additional options requires using object notation for the trend option, like in the following example:
var chartOptions = { trend: { type: 'moving-average', label: 'My Trend', periods: 4 // additional option of the 'moving-average' trend type } };Trending is performed after null-interpolation, so that it takes the null-interpolated datums into account.
Field Detail
{string}
label
A description to show next to the trended data.
The description shows next to legend items and in auto-generated tooltips.
The default value is the description of the associated trend type.
{string}
type
The type of trend to perform on the data of the associated plot.
The specified trend type must have been previously defined in the CCC library, through the pvc.trends.define method.
Some trend types come with the CCC library. Currently these are:
- 'linear'
-
performs a
simple linear regression (see http://en.wikipedia.org/wiki/Simple_linear_regression) - 'moving-average'
- performs a simple moving average (see http://en.wikipedia.org/wiki/Moving_average); the additional option periods, which defaults to 3, and must not be less than 2, may be specified to control the number of data points of the average window.
- 'weighted-moving-average'
- performs a weighted moving average (see http://en.wikipedia.org/wiki/Moving_average); the additional option periods, which defaults to 3, and must not be less than 2, may be specified to control the number of data points of the average window.