abreBanco(); $n= $genopar->queryBanco(" SELECT count(v.status) as n, v.status as status, CONCAT('#',v.color) as color FROM anotacao a, validation v WHERE a.idMontagem = '$mtg' AND a.validation = v.code GROUP BY v.code "); $total=0; $color= $cogs= $fun= $leituras= $lgd= $url1= $url2= $desc= array(); // $color = array('#0066CC', '#FFCC66', '#CC9933', '#FF3300', '#33FF00'); while ($lin= $genopar->getArray()) { // array_push($lgd, $lin['FUN'].": ".$lin['leituras']."/".$lin['COGs']); array_push($desc, $lin['status']." - ".$lin['n']); $total += $lin['n']; array_push($url2, "#"); array_push($cogs, $lin['n']); array_push($color, $lin['color']); } // Create the Pie Graph. $graph = new PieGraph(450,400,'auto'); $graph->SetShadow(); // Set A title for the plot $graph->title->Set("Status - ORF's (genes: $total)"); $graph->title->SetFont(FF_VERDANA,FS_BOLD,14); $graph->title->SetColor("darkblue"); $graph->legend->Pos(0.01,0.98,'right','bottom'); $graph->legend->SetColumns(5); $graph->legend->SetColor('black','white'); $graph->legend->SetFillColor('white'); $graph->legend->SetShadow(0); $p2 = new PiePlot3d(array_values($cogs)); $p2->SetSliceColors($color); $p2->SetHeight(20); $p2->SetLabelType(PIE_VALUE_PER); $p2->SetAngle(85); $p2->value->SetFont(FF_ARIAL,FS_NORMAL,9); $p2->SetSize(0.35); // $p2->SetCenter(0.70,0.4); $p2->ExplodeAll(7); // You can explode several slices by specifying the explode // distance for some slices in an array //$p1->Explode(array(0,40,0,30)); // As a shortcut you can easily explode one numbered slice with // $p1->ExplodeSlice(3); // $p1->SetLegends(array_values($lgd)); //$p1->SetLegends(array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct")); // $p1->SetCSIMTargets($url1,$desc); $p2->SetCSIMTargets($url2,$desc); // $graph->Add($p1); $graph->Add($p2); $graph->StrokeCSIM(basename(__FILE__)); ?>