From: robert Date: Wed, 18 May 2005 21:07:11 +0000 (+0000) Subject: allow legends for simple dataset-derived graphs X-Git-Url: https://git-public.kairo.at/?a=commitdiff_plain;h=75124b94e74fb301e2d09d25c7e3b8b2564d42e0;p=php-utility-classes.git allow legends for simple dataset-derived graphs --- diff --git a/include/classes/rrdstat.php-class b/include/classes/rrdstat.php-class index 2fc1de1..ff14445 100644 --- a/include/classes/rrdstat.php-class +++ b/include/classes/rrdstat.php-class @@ -400,6 +400,10 @@ class rrdstat { } $grow['gType'] = ((count($this->rrd_fields)==2) && ($key==0))?'AREA':'LINE1'; $grow['color'] = $gColors[$gC++]; if ($gC >= count($gColors)) { $gC = 0; } + if (isset($ds['legend'])) { + $grow['legend'] = $ds['legend']; + if (!isset($gconf['show_legend'])) { $gconf['show_legend'] = true; } + } $graphrows[] = $grow; } }