abreBanco(); verGetPost(array("bco")); $n= $genopar->queryBanco("select lab, count(*) as qtd_reads, sum(if(basge20>=400,1,0)) as reads_ok from prod " .(isset($bco) ? "where bco='$bco'":""). " group by lab"); $datay= $datay2= $labelx= array(); while ($lin= $genopar->getArray()) { array_push($datay, $lin["qtd_reads"] - $lin["reads_ok"]); array_push($datay2, $lin["reads_ok"]); array_push($labelx, $lin["lab"]); } $graph = new Graph(600,400); $graph->SetScale("textlin"); $graph->xaxis->SetTickLabels($labelx); $graph->xaxis->SetTextTickInterval(1); $graph->xaxis->SetFont(FF_FONT1); $graph->xaxis->SetLabelAngle(90); $graph->img->SetMargin(60,40,40,45); $graph->SetShadow(); $graph->SetGridDepth(DEPTH_BACK); $graph->title->Set("Submissoes de Sequencias por Laboratorio"); if (isset($bco)) $graph->subtitle->Set("Especificado para a Biblioteca $bco"); $graph->title->SetFont(FF_FONT1,FS_BOLD); $graph->xaxis->SetTitlemargin(10); $graph->yaxis->SetTitlemargin(45); $graph->xaxis->title->Set("Laboratorio"); $graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); $graph->yaxis->title->Set("Numero de Submissoes"); $graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); $graph->legend->Pos(0.1,0.11,'right','top'); $bplot1 = new BarPlot($datay2); $bplot1->SetWidth(0.6); $bplot1->SetFillColor("lightsteelblue"); $bplot1->SetFillGradient("navy","lightsteelblue",GRAD_WIDE_MIDVER); $bplot1->SetColor("navy"); $bplot1->SetLegend("Aceitas"); $bplot2 = new BarPlot($datay); $bplot2->SetWidth(0.6); $bplot2->SetFillColor("lightcoral"); $bplot2->SetFillGradient("darkred","lightcoral",GRAD_WIDE_MIDVER); $bplot2->SetColor("darkred"); $bplot2->SetLegend("Total"); $abplot = new AccBarPlot(array($bplot1,$bplot2)); $graph->Add($abplot); $txt=new Text("GENOPAR"); $txt->SetPos(2,2); $txt->SetColor("snow1"); $txt->SetFont(FF_FONT1, FS_BOLD, 7); $graph->AddText($txt); $graph->Stroke(); ?>