summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authoralisonjm <alisonjm>2011-04-25 18:05:07 +0000
committeralisonjm <alisonjm>2011-04-25 18:05:07 +0000
commit946ce16879ba8514f1277c0cff4ac31bc6900c40 (patch)
tree6c603c438452892fe6c4d2d0be42503996579427 /src/lib
parenteb0192c1299db3c36a506b06c0e4d8e277fcc7f9 (diff)
Added rrdflot_defaults documentation, changed varibale name
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/rrdFlot.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/lib/rrdFlot.js b/src/lib/rrdFlot.js
index 3cf4ed6..3c5c3b6 100644
--- a/src/lib/rrdFlot.js
+++ b/src/lib/rrdFlot.js
@@ -46,6 +46,15 @@
* yaxis: 1 // can be 1 or 2
* stack: 'none' // other options are 'positive' and 'negative'
* }
+/* rrdflot_defeaults defaults (see Flot docs for details)
+ * {
+ * legend: "Top" //Starting location of legend. Options are:
+ * //"Top","Bottom","TopRight","BottomRight","None".
+ * num_cb_rows: 12 //How many rows of DS checkboxes per column.
+ * multi_ds: false //"true" appends the name of the aggregation function to the
+ * //name of the DS element. Useful for when an element is displayed
+ * //more than once but under different aggregation functions.
+ * }
*/
function rrdFlot(html_id, rrd_file, graph_options, ds_graph_options, rrdflot_defaults) {
@@ -193,13 +202,13 @@ rrdFlot.prototype.populateDScb = function() {
row_el.vAlign="top";
var cell_el=null; // will define later
- if (this.rrdflot_defaults.num_legend_rows==null) {
- this.rrdflot_defaults.num_legend_rows=8;
+ if (this.rrdflot_defaults.num_cb_rows==null) {
+ this.rrdflot_defaults.num_cb_rows=12;
}
// now populate with DS info
var nrDSs=this.rrd_file.getNrDSs();
for (var i=0; i<nrDSs; i++) {
- if ((i%this.rrdflot_defaults.num_legend_rows)==0) { // one column every x DSs
+ if ((i%this.rrdflot_defaults.num_cb_rows)==0) { // one column every x DSs
cell_el=row_el.insertCell(-1);
}
var ds=this.rrd_file.getDS(i);