From: hickert Date: Thu, 12 Aug 2010 08:28:07 +0000 (+0000) Subject: Updated statistics graph to be of type Pie X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=266f8deefd4f8a7282fad2eb4a94c9e6646e90d4;p=gosa.git Updated statistics graph to be of type Pie git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19379 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/generic/statistics/class_statistics.inc b/gosa-core/plugins/generic/statistics/class_statistics.inc index 63c51f72f..30fe2cfe5 100644 --- a/gosa-core/plugins/generic/statistics/class_statistics.inc +++ b/gosa-core/plugins/generic/statistics/class_statistics.inc @@ -74,8 +74,18 @@ class statistics extends plugin $this->graphID_1 = preg_replace("/[^0-9]/","",microtime(TRUE)); - $plot = new PHPlot(); + $plot = new PHPlot(600,400); + $plot->SetImageBorderType('plain'); + + $plot->SetTitle("World Gold Production, 1990\n(1000s of Troy Ounces)"); + $plot->SetPlotType('pie'); + $plot->SetDataType('text-data-single'); $plot->SetDataValues($data); + + foreach ($data as $row) + $plot->SetLegend(implode(': ', $row)); + + $plot->SetOutputFile('/tmp/graph_'.$this->graphID_1); $plot->SetIsInline(TRUE); $plot->DrawGraph();