summaryrefslogtreecommitdiff
path: root/src/lib/rrdFlotSupport.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/rrdFlotSupport.js')
-rw-r--r--src/lib/rrdFlotSupport.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/rrdFlotSupport.js b/src/lib/rrdFlotSupport.js
index 116dc35..607ec0b 100644
--- a/src/lib/rrdFlotSupport.js
+++ b/src/lib/rrdFlotSupport.js
@@ -99,7 +99,7 @@ function rrdRRA2FlotObj(rrd_file,rra_idx,ds_list,want_ds_labels,want_rounding) {
// of the stack is invalid
function rrdRRAStackFlotObj(rrd_file,rra_idx,
ds_positive_stack_list,ds_negative_stack_list,ds_single_list,
- want_ds_labels,want_rounding,one_undefined_enough) {
+ timestamp_shift, want_ds_labels,want_rounding,one_undefined_enough) {
var rra=rrd_file.getRRA(rra_idx);
var rra_rows=rra.getNrRows();
var last_update=rrd_file.getLastUpdate();
@@ -115,7 +115,7 @@ function rrdRRAStackFlotObj(rrd_file,rra_idx,
var first_el=last_update-(rra_rows-1)*step;
- var out_el={data:[], min:first_el*1000.0, max:last_update*1000.0};
+ var out_el={data:[], min:(first_el+timestamp_shift)*1000.0, max:(last_update+timestamp_shift)*1000.0};
// first the stacks stack
var stack_els=[ds_positive_stack_list,ds_negative_stack_list];
@@ -164,7 +164,7 @@ function rrdRRAStackFlotObj(rrd_file,rra_idx,
}
// fill the flot data
for (var id=0; id<tmp_nr_ids; id++) {
- tmp_flot_els[id].data.push([timestamp*1000.0,ds_vals[id]]);
+ tmp_flot_els[id].data.push([(timestamp+timestamp_shift)*1000.0,ds_vals[id]]);
}
}
} // end if
@@ -190,7 +190,7 @@ function rrdRRAStackFlotObj(rrd_file,rra_idx,
for (var i=0;i<rra_rows;i++) {
var el=rra.getEl(i,ds_idx);
if (el!=undefined) {
- flot_series.push([timestamp*1000.0,el]);
+ flot_series.push([(timestamp+timestamp_shift)*1000.0,el]);
}
timestamp+=step;
} // end for