diff options
Diffstat (limited to 'boca-1.5.0/src/admin/report/piechart.php')
| -rw-r--r-- | boca-1.5.0/src/admin/report/piechart.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/boca-1.5.0/src/admin/report/piechart.php b/boca-1.5.0/src/admin/report/piechart.php index 18d8d04..e6dbf95 100644 --- a/boca-1.5.0/src/admin/report/piechart.php +++ b/boca-1.5.0/src/admin/report/piechart.php @@ -41,7 +41,12 @@ else $chart = new PieChart(400, 250); if(isset($_GET['order'])) $chart->order=true; +else $chart->order=false; +$tot=0; +for($i=1;$i<count($v); $i+=2) { + $tot += $v[$i+1]; +} for($i=1;$i<count($v); $i+=2) { $color = null; if($cor != null) { @@ -50,7 +55,10 @@ for($i=1;$i<count($v); $i+=2) { $b = hexdec( substr($cor[($i-1)/2], 4, 2) ); $color = array($r, $g, $b); } - $chart->addPoint(new Point($v[$i], $v[$i+1], $color)); + if($v[$i+1] > $tot/100) + $chart->addPoint(new Point($v[$i], $v[$i+1], $color)); + else + $chart->addPoint(new Point($v[$i], $tot/100, $color)); } $chart->setTitle($v[0]); |