The rrdFlotMatrix Javascript module implements a class used to represents a DS from a list of similar RDD archives as a Flot plot. All RRDs must have the same step, the same DS names and the same number of RRAs. |
This module provide a single class: rrdFlotMatrix.
Given a RRDFile object, this class creates an interactive Flot plot.
In order to use this module, you also need to include:
The rrdFlotMatrix constructor has two to five arguments:
Argument |
Description |
---|---|
html_id |
ID of a HTML element, possibly a DIV. |
rrd_files |
A list of RRDs. Each element of the list contains a [rrd_id,rrd_file] pair.
|
ds_list (optional) |
A list of DSes. Each element of the list contains a [ds_id,ds_title] pair.
If undefined, all the DS's of the RRD will be used. |
graph_options (optional) |
Global graphing options. See Flot documentation for more details. The recognized elements and the default values are: graph_options = { legend: {position:"nw",noColumns:3}, lines: { show:true }, yaxis: { autoscaleMargin: 0.20}, tooltip: true, tooltipOpts: { content: "<h4>%s</h4> Value: %y.3" }, // %s: series text, %y.3: y-value toPrecision(3) }; |
rrd_graph_options (optional) |
Dictionary of graphing options. This must be a dictionary of rrd_id. Each element of the dictionary contains graphing options. See Flot documentation for more details. The recognized elements and the default values are: { title: label or rrd_name // this is what is displayed in the checkboxes checked: true // boolean label: title or rrd_name // this is what is displayed in the legend color: rrd_index // see Flot docs for details lines: { show:true, fill: true, fillColor:color } // see Flot docs for details } |
Once instatiated, the object will automatically draw the plot and handle user interaction.
This module is part of the javascriptRRD
package hosted at http://javascriptrrd.sourceforge.net.
|