Plot timeseries from meter measurements.
- Source:
Methods
(static) plotForDay($placeholder, series)
Plot series for a certain day.
Parameters:
Name |
Type |
Description |
$placeholder |
jQuery
|
The DOM element (as a jQuery result) to hold the chart. |
series |
array
|
The series to be plotted. Each item contains data and per-series options.
See plotAsBars. |
- Source:
Plot series for a certain month.
Parameters:
Name |
Type |
Description |
$placeholder |
jQuery
|
The DOM element (as a jQuery result) to hold the chart. |
series |
array
|
The series to be plotted. Each item contains data and per-series options.
See plotAsLines. |
- Source:
(static) plotForWeek($placeholder, series)
Plot series for a certain week.
Parameters:
Name |
Type |
Description |
$placeholder |
jQuery
|
The DOM element (as a jQuery result) to hold the chart. |
series |
array
|
The series to be plotted. Each item contains data and per-series options.
See plotAsBars. |
- Source:
(static) plotForYear($placeholder, series)
Plot series for a certain year.
Parameters:
Name |
Type |
Description |
$placeholder |
jQuery
|
The DOM element (as a jQuery result) to hold the chart. |
series |
array
|
The series to be plotted. Each item contains data and per-series options.
See plotAsLines. |
- Source:
(inner) plotAsBars($placeholder, series, granularity, config)
Plot timeseries as a bar (column) chart.
Parameters:
Name |
Type |
Description |
$placeholder |
jQuery
|
The DOM element (as a jQuery result) to hold the chart. |
series |
array
|
The series to be plotted. Each item contains data and per-series options.
Properties
Name |
Type |
Description |
0.data |
array
|
An array of Measurement objects |
0.color |
string
|
The RGB color for columns. |
0.levels |
array
|
An array that defines levels (zones) for values.
Properties
Name |
Type |
Description |
0.range |
array
|
An array of 2 values that defines a numeric range |
0.color |
string
|
An RGB color to be used for values falling into the range of this level |
0.description |
string
|
A textual description for this level |
|
|
granularity |
string
|
The time granularity.
One of `auto`, `minute`, `hour`, `day`, `week`, `month`. |
config |
object
|
An dict of options that further configure plotting.
Properties
Name |
Type |
Description |
bars.widthRatio |
number
|
A number in (0, 1). The total bar width will cover this ratio of a category bucket. |
|
- Source:
(inner) plotAsLines($placeholder, series, granularity, config)
Plot timeseries as line/area charts.
Parameters:
Name |
Type |
Description |
$placeholder |
jQuery
|
The DOM element (as a jQuery result) to hold the chart. |
series |
array
|
The series to be plotted. Each item contains data and per-series options.
Properties
Name |
Type |
Description |
0.data |
array
|
An array of Measurement objects |
0.fill |
number
|
The alpha level of the are below the line. If null is given, then the area is not plotted. |
0.line |
string
|
The style of plotted line. One of `solid`, `dashed`. |
0.color |
string
|
The RGB color of this line. |
|
granularity |
string
|
The time granularity.
One of `auto`, `minute`, `hour`, `day`, `week`, `month`. |
config |
object
|
An dict of options that further configure plotting. |
- Source: