allow legends for simple dataset-derived graphs
authorrobert <robert>
Wed, 18 May 2005 21:07:11 +0000 (21:07 +0000)
committerrobert <robert>
Wed, 18 May 2005 21:07:11 +0000 (21:07 +0000)
include/classes/rrdstat.php-class

index 2fc1de17c7b02186a494e3fcab683a971bf4a949..ff144456b2103bd05cc17c041443600b7510f21c 100644 (file)
@@ -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;
       }
     }