aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--js/RrdGraph.js16
1 files changed, 13 insertions, 3 deletions
diff --git a/js/RrdGraph.js b/js/RrdGraph.js
index cd422fd..235b35f 100644
--- a/js/RrdGraph.js
+++ b/js/RrdGraph.js
@@ -2541,7 +2541,7 @@ RrdGraph.prototype.graph_size_location = function (elements)
2541 return 0; 2541 return 0;
2542}; 2542};
2543 2543
2544RrdGraph.prototype.graph_paint = function() 2544RrdGraph.prototype.graph_paint_init = function()
2545{ 2545{
2546 if (this.logarithmic && this.minval <= 0) 2546 if (this.logarithmic && this.minval <= 0)
2547 throw new RrdGraphError("for a logarithmic yaxis you must specify a lower-limit > 0"); 2547 throw new RrdGraphError("for a logarithmic yaxis you must specify a lower-limit > 0");
@@ -2573,11 +2573,13 @@ RrdGraph.prototype.graph_paint = function()
2573// this.gdes[i].end_orig = this.end; 2573// this.gdes[i].end_orig = this.end;
2574 } 2574 }
2575 2575
2576}
2577
2578RrdGraph.prototype.graph_paint_draw = function()
2579{
2576 var areazero = 0.0 2580 var areazero = 0.0
2577 var lastgdes = null; 2581 var lastgdes = null;
2578 2582
2579 if (this.data_fetch() === -1)
2580 return -1;
2581 if (this.data_calc() === -1) 2583 if (this.data_calc() === -1)
2582 return -1; 2584 return -1;
2583 var i = this.print_calc(); 2585 var i = this.print_calc();
@@ -2825,6 +2827,14 @@ RrdGraph.prototype.graph_paint = function()
2825 return 0; 2827 return 0;
2826}; 2828};
2827 2829
2830RrdGraph.prototype.graph_paint = function ()
2831{
2832 this.graph_paint_init()
2833 if (this.data_fetch() === -1)
2834 return -1;
2835 return this.graph_paint_draw()
2836};
2837
2828RrdGraph.prototype.find_var = function(key) 2838RrdGraph.prototype.find_var = function(key)
2829{ 2839{
2830 for (var ii = 0, gdes_c = this.gdes.length; ii < gdes_c; ii++) { 2840 for (var ii = 0, gdes_c = this.gdes.length; ii < gdes_c; ii++) {