summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fcc1391)
raw | patch | inline | side by side (parent: fcc1391)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 24 Aug 2010 08:26:15 +0000 (08:26 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 24 Aug 2010 08:26:15 +0000 (08:26 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19431 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/generic/statistics/class_statistics.inc | patch | blob | history |
diff --git a/gosa-core/plugins/generic/statistics/class_statistics.inc b/gosa-core/plugins/generic/statistics/class_statistics.inc
index 93ba75459cd73ddccd6803984bfe0c2bc067ab76..4f7d62fa661c61a193737e97a56e470f20231513 100644 (file)
$seriesCnt = 0;
$gID = 2;
$chart = new pChart(800,230);
+ $seriesShown = 0;
foreach($gData['actionsPerInterval'] as $category => $entriesPerDate){
if(empty($category)) continue;
// Set series color
$color = $this->legendColors[$seriesCnt];
$legendData[$seriesCnt] = array('name' => $category,'desc'=>$desc,'color' => $color);
- list($r,$g,$b) = $color;
- $chart->setColorPalette($seriesCnt,$r,$g,$b);
// Do not add graph data for skipped series
if(!in_array($category, $this->skipSeries[$gID])){
$dataSet->SetSerieName($desc, $category);
$dataSet->AddSerie($category);
+ list($r,$g,$b) = $color;
+ $chart->setColorPalette($seriesShown,$r,$g,$b);
+
// Detect maximum value, to adjust the Y-Axis
$tmpMax = max($entriesPerDate);
if($tmpMax > $lineMax) $lineMax = $tmpMax;
+
+ $seriesShown ++;
}
$seriesCnt ++;
// Set the color for the error Series to 'red'.
// This has to be done before drawing the legend.
- $chart->setColorPalette($seriesCnt,255,0,0);
+ $chart->setColorPalette($seriesShown,255,0,0);
$dataSet->AddPoint($gData['errorsPerInterval'], 'Errors');
$dataSet->SetSerieName(_('Error'), 'Errors');
$dataSet->AddSerie('Errors');