Code

Updated statistics plugin
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 16 Aug 2010 14:25:52 +0000 (14:25 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 16 Aug 2010 14:25:52 +0000 (14:25 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19399 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/generic/statistics/class_statistics.inc

index 9badf61ecd343d4e10d260c14944534133b425a2..0aa840e852b42b73f65630d03464dcaab40d1be8 100644 (file)
@@ -132,12 +132,14 @@ class statistics extends plugin
                     // Build up DataSet. 
                     $DataSet2 = new pData;  
                     $intervalEntries = array();
-                    $max = 500;
+                    $max = 0;
                     foreach($res['actionsPerInterval'] as $category => $dates){
                         if(!isset($mostUsedCategories[$category])) continue;
                         ksort($res['actionsPerInterval'][$category]);
                         $DataSet2->AddPoint($res['actionsPerInterval'][$category], $category);
                         $DataSet2->SetSerieName(_($category), $category);
+                        $tmpMax = max($res['actionsPerInterval'][$category]);
+                        if($tmpMax > $max) $max = $tmpMax;
                     }
                     $DataSet2->AddAllSeries();