Code

Added object count chart
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 25 Aug 2010 15:53:29 +0000 (15:53 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 25 Aug 2010 15:53:29 +0000 (15:53 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19451 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/generic/statistics/chartClasses/class_objectCountChart.inc
gosa-core/plugins/generic/statistics/chartClasses/class_statChart.inc

index ce543020aac48d4a668fd636074627b42259ebc7..b5cf340b21e80db96436eb93b90abbd668b00248 100644 (file)
@@ -15,7 +15,7 @@ class objectCountChart extends statChart
      */ 
     function render()
     {
-        $lineMax = 100;
+        $lineMax = 20;
         $gData = $this->graphData;
         $dataSet = new pData;  
         $seriesCnt = 0;
@@ -59,7 +59,7 @@ class objectCountChart extends statChart
         }
 
         $chart = new pChart(900,230);  
-        $chart->setFixedScale(0.000,$lineMax);
+        $chart->setFixedScale(0,$lineMax);
         $chart->setFontProperties("./themes/default/fonts/LiberationSans-Regular.ttf",10);  
         $chart->setGraphArea(50,28,630,200);  
         $chart->drawFilledRoundedRectangle(7,7,693,223,5,240,240,240);  
@@ -73,9 +73,9 @@ class objectCountChart extends statChart
         // Only draw this graph if we've at least one series to draw! 
         if($seriesCnt){
             $chart->drawFilledLineGraph($dataSet->GetData(),$dataSet->GetDataDescription(),50,TRUE);
+            $chart->drawLegend(720,0,$dataSet->GetDataDescription(),255,255,255);
         }
 
-        $chart->drawLegend(720,0,$dataSet->GetDataDescription(),255,255,255);
 
         // Generate new and unique graph id
         $this->graphID = preg_replace("/[^0-9]/","",microtime(TRUE));
index 97d723239432ecbd6cc25593b0c0bcaf6dfcfd8f..7cbba822bba68bab9a2003311d4861e6b58e82a0 100644 (file)
@@ -85,9 +85,10 @@ class statChart{
         foreach($list as $key => $item){
             $checked = (in_array($key, $this->skipSeries))? '': 'checked';
             $str .= "<span style='padding-right:20px'>".
-                    "   <input type='checkbox' name='addSeries_{$this->graphName}_{$key}' value='1'".
+                    "   <input id='addSeries_{$this->graphName}_{$key}' type='checkbox' ".
+                    "       name='addSeries_{$this->graphName}_{$key}' value='1'".
                     "       onClick=\"document.mainform.submit();\" ".
-                    "       {$checked}>{$item}".
+                    "       {$checked}><LABEL for='addSeries_{$this->graphName}_{$key}'>{$item}</LABEL>".
                     "   </span>";
         }
         return($str);