diff options
-rw-r--r-- | type/Default.class.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/type/Default.class.php b/type/Default.class.php index 26189c7..48852d4 100644 --- a/type/Default.class.php +++ b/type/Default.class.php | |||
@@ -39,7 +39,7 @@ class Type_Default { | |||
39 | $sources = count($this->rrd_get_sources()); | 39 | $sources = count($this->rrd_get_sources()); |
40 | foreach ($this->rrd_get_sources() as $ds) { | 40 | foreach ($this->rrd_get_sources() as $ds) { |
41 | # hue (saturnation=1, value=1) | 41 | # hue (saturnation=1, value=1) |
42 | $h = 360 - ($c * (330/($sources-1))); | 42 | $h = $sources > 1 ? 360 - ($c * (330/($sources-1))) : 360; |
43 | 43 | ||
44 | $h = ($h %= 360) / 60; | 44 | $h = ($h %= 360) / 60; |
45 | $f = $h - floor($h); | 45 | $f = $h - floor($h); |