diff options
Diffstat (limited to '')
-rw-r--r-- | js/RrdGraph.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/js/RrdGraph.js b/js/RrdGraph.js index 038668e..c2457c9 100644 --- a/js/RrdGraph.js +++ b/js/RrdGraph.js | |||
@@ -210,8 +210,10 @@ RrdGraphDesc.prototype.def = function (graph, vname, rrdfile, name, cf, step, st | |||
210 | this.ds_nam = name; | 210 | this.ds_nam = name; |
211 | this.cf = RrdGraphDesc.cf_conv(cf); | 211 | this.cf = RrdGraphDesc.cf_conv(cf); |
212 | 212 | ||
213 | if (step != undefined && step != null) | 213 | if (step != undefined && step != null) { |
214 | this.step = step; | 214 | this.step = step; |
215 | this.step_orig = step; | ||
216 | } | ||
215 | if (start != undefined && start != null) | 217 | if (start != undefined && start != null) |
216 | start_t = new RrdTime(start); | 218 | start_t = new RrdTime(start); |
217 | if (end != undefined && end != null) | 219 | if (end != undefined && end != null) |
@@ -757,6 +759,7 @@ var RrdGraph = function (gfx, data) | |||
757 | this.watermark = null; /* watermark for graph */ | 759 | this.watermark = null; /* watermark for graph */ |
758 | this.tabwidth = 40; /* tabwdith */ | 760 | this.tabwidth = 40; /* tabwdith */ |
759 | this.step = 0; /* any preference for the default step ? */ | 761 | this.step = 0; /* any preference for the default step ? */ |
762 | this.step_orig = 0; /* any preference for the default step ? */ | ||
760 | this.setminval = Number.NaN; /* extreme values in the data */ | 763 | this.setminval = Number.NaN; /* extreme values in the data */ |
761 | this.setmaxval = Number.NaN; | 764 | this.setmaxval = Number.NaN; |
762 | this.rigid = false; /* do not expand range even with values outside */ | 765 | this.rigid = false; /* do not expand range even with values outside */ |
@@ -2650,11 +2653,10 @@ RrdGraph.prototype.graph_paint_init = function() | |||
2650 | this.minval = this.setminval; | 2653 | this.minval = this.setminval; |
2651 | this.maxval = this.setmaxval; | 2654 | this.maxval = this.setmaxval; |
2652 | 2655 | ||
2653 | this.step = Math.max(this.step, (this.end - this.start) / this.xsize); | 2656 | this.step = Math.max(this.step_orig, (this.end - this.start) / this.xsize); |
2654 | 2657 | ||
2655 | for (var i = 0, gdes_c = this.gdes.length; i < gdes_c; i++) { | 2658 | for (var i = 0, gdes_c = this.gdes.length; i < gdes_c; i++) { |
2656 | this.gdes[i].step = 0; // FIXME 0? | 2659 | this.gdes[i].step = this.gdes[i].step_orig; |
2657 | this.gdes[i].step_orig = this.step; | ||
2658 | this.gdes[i].start = this.start; // FIXME SHIFT | 2660 | this.gdes[i].start = this.start; // FIXME SHIFT |
2659 | // this.gdes[i].start_orig = this.start; | 2661 | // this.gdes[i].start_orig = this.start; |
2660 | this.gdes[i].end = this.end; // FIXME SHIFT | 2662 | this.gdes[i].end = this.end; // FIXME SHIFT |