From 9c5db2497ec0c30e2f67bc920317f19bbf185ff7 Mon Sep 17 00:00:00 2001 From: Frank Wuerthwein Date: Fri, 1 May 2009 13:04:34 +0000 Subject: Switch from rrdRRA2FlotObj to rrdRRAStackFlotObj. Add stack graph option --- src/lib/rrdFlot.js | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/src/lib/rrdFlot.js b/src/lib/rrdFlot.js index c9dbf9c..5046e10 100644 --- a/src/lib/rrdFlot.js +++ b/src/lib/rrdFlot.js @@ -40,6 +40,7 @@ * color: ds_index * lines: { show:true } * yaxis: 1 + * stack: 'none' // other options are 'positive' and 'negative' * } */ @@ -227,26 +228,44 @@ rrdFlot.prototype.drawFlotGraph = function() { var rra_idx=Number(oSelect.options[oSelect.selectedIndex].value); // now get the list of selected DSs - var ds_idxs=[]; + var ds_positive_stack_list=[]; + var ds_negative_stack_list=[]; + var ds_single_list=[]; var ds_colors=[]; var oCB=document.getElementById(this.ds_cb_id); var nrDSs=oCB.ds.length; if (oCB.ds.length>0) { for (var i=0; i