abreBanco(); verGetPost(array("lab","bco")); if (isset($lab) && isset($bco)) { $where="where lab='$lab' and bco='$bco'"; $esp="o Laboratorio $lab e a Biblioteca $bco"; } elseif(isset($lab)) { $where="where lab='$lab'"; $esp="o Laboratorio $lab"; } elseif(isset($bco)) { $where="where bco='$bco'"; $esp="a Biblioteca $bco"; } else $where=''; $n= $genopar->queryBanco("select count(*) as qtd_reads, sum(if(basge20>=400,1,0)) as reads_ok, concat(month(dt_sub),'-',year(dt_sub)) as mes from prod $where group by concat(year(dt_sub),month(dt_sub)) order by dt_sub"); $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["mes"]); } $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,75); $graph->SetShadow(); $graph->SetGridDepth(DEPTH_BACK); $graph->title->Set("Submissoes de Sequencias por Mes"); if (isset($lab) || isset($bco)) $graph->subtitle->Set("Especificado para $esp"); $graph->title->SetFont(FF_FONT1,FS_BOLD); $graph->xaxis->SetTitlemargin(35); $graph->yaxis->SetTitlemargin(45); $graph->xaxis->title->Set("Mes - Ano"); $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,'left','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); $rede_seq = strtoupper($genopar->rede_seq); $txt=new Text($rede_seq); $txt->SetPos(2,2); $txt->SetColor("snow1"); $txt->SetFont(FF_VERDANA, FS_BOLD, 7); $graph->AddText($txt); $graph->Stroke(); ?>