diff options
author | Frank Wuerthwein <fkw@ucsd.edu> | 2009-02-20 03:41:17 +0000 |
---|---|---|
committer | Frank Wuerthwein <fkw@ucsd.edu> | 2009-02-20 03:41:17 +0000 |
commit | 77653989fd308e12a2991deb9b83ee92c79c1a8c (patch) | |
tree | c78d20f1eda282ae2278bdde385d119a48b7286e /src | |
parent | cf222313521e30a5b337bf7fc4223176148da73b (diff) |
Fix math error
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/rrdFlotSupport.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/rrdFlotSupport.js b/src/lib/rrdFlotSupport.js index 556f0a4..0e9c1be 100644 --- a/src/lib/rrdFlotSupport.js +++ b/src/lib/rrdFlotSupport.js @@ -27,7 +27,7 @@ function rrdDS2FlotSeries(rrd_file,ds_id,rra_idx,want_label) { var last_update=rrd_file.getLastUpdate();
var step=rra.getStep();
- var first_el=(last_update-rra_rows+1)*step;
+ var first_el=last_update-(rra_rows-1)*step;
var timestamp=first_el;
var flot_series=[];
for (var i=0;i<rra_rows;i++) {
@@ -52,7 +52,7 @@ function rrdRRA2FlotObj(rrd_file,rra_idx,ds_list,want_ds_labels) { var rra_rows=rra.getNrRows();
var last_update=rrd_file.getLastUpdate();
var step=rra.getStep();
- var first_el=(last_update-rra_rows+1)*step;
+ var first_el=last_update-(rra_rows-1)*step;
var out_el={data:[], min:first_el*1000.0, max:last_update*1000.0};
|