aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/type
diff options
context:
space:
mode:
Diffstat (limited to 'type')
-rw-r--r--type/Base.class.php2
-rw-r--r--type/Default.class.php7
2 files changed, 5 insertions, 4 deletions
diff --git a/type/Base.class.php b/type/Base.class.php
index 34e182f..5af4c29 100644
--- a/type/Base.class.php
+++ b/type/Base.class.php
@@ -24,6 +24,7 @@ class Type_Base {
24 var $negative_io; 24 var $negative_io;
25 var $percentile = false; 25 var $percentile = false;
26 var $graph_smooth; 26 var $graph_smooth;
27 var $graph_minmax;
27 28
28 var $files; 29 var $files;
29 var $tinstances; 30 var $tinstances;
@@ -57,6 +58,7 @@ class Type_Base {
57 $this->graph_type = $config['graph_type']; 58 $this->graph_type = $config['graph_type'];
58 $this->negative_io = $config['negative_io']; 59 $this->negative_io = $config['negative_io'];
59 $this->graph_smooth = $config['graph_smooth']; 60 $this->graph_smooth = $config['graph_smooth'];
61 $this->graph_minmax = $config['graph_minmax'];
60 $this->flush_socket = $config['socket']; 62 $this->flush_socket = $config['socket'];
61 $this->flush_type = $config['flush_type']; 63 $this->flush_type = $config['flush_type'];
62 } 64 }
diff --git a/type/Default.class.php b/type/Default.class.php
index 9f3b97a..6e7efd9 100644
--- a/type/Default.class.php
+++ b/type/Default.class.php
@@ -35,13 +35,12 @@ class Type_Default extends Type_Base {
35 } 35 }
36 } 36 }
37 37
38 if(count($this->files)<=1) { 38 if ($this->graph_minmax) {
39 $c = 0; 39 $c = 0;
40 foreach ($sources as $source) { 40 foreach ($sources as $source) {
41 $color = is_array($this->colors) ? (isset($this->colors[$source])?$this->colors[$source]:$this->colors[$c++]): $this->colors; 41 $color = is_array($this->colors) ? (isset($this->colors[$source])?$this->colors[$source]:$this->colors[$c++]): $this->colors;
42 $rrdgraph[] = sprintf('AREA:max_%s#%s', crc32hex($source), $this->get_faded_color($color)); 42 $rrdgraph[] = sprintf('LINE1:max_%s#%s', crc32hex($source), $this->get_faded_color($color));
43 $rrdgraph[] = sprintf('AREA:min_%s#%s', crc32hex($source), 'ffffff'); 43 $rrdgraph[] = sprintf('LINE1:min_%s#%s', crc32hex($source), $this->get_faded_color($color));
44 break; # only 1 area to draw
45 } 44 }
46 } 45 }
47 46