From 75124b94e74fb301e2d09d25c7e3b8b2564d42e0 Mon Sep 17 00:00:00 2001 From: robert Date: Wed, 18 May 2005 21:07:11 +0000 Subject: [PATCH] allow legends for simple dataset-derived graphs --- include/classes/rrdstat.php-class | 4 ++++ 1 file changed, 4 insertions(+) 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; } } -- 2.35.3