$reqSelect],'graphOS');} $resConn=$idPdo->query($reqSelect); $l=-1; while ($tbP=$resConn->fetch(PDO::FETCH_ASSOC)) { $l++; $data[$l]=$tbP['nb']; $lib[$l]=$tbP['os']; // echo '$data[' .$l. ']=' .$data[$l]; } $largeur = 470; $hauteur = 400; if(count($lib)> 200) $hauteur = 20 * count($lib); $graph = new Graph($largeur, $hauteur, "auto"); $graph->setScale("textlin"); $histo = new BarPlot($data); // $graph->SetBackgroundImage("mer_antilles_fond.jpg",BGIMG_FILLFRAME); // $graph->img->SetAntiAliasing("white"); $graph->SetShadow(); $graph->add($histo); $graph->Set90AndMargin(110,40,30,30); $graph->xaxis->SetPos('SIDE_LEFT'); $graph->yaxis->SetLabelMargin(-12); $graph->xaxis->SetColor('black','blue'); $graph->yaxis->scale->SetGrace(0); $graph->yaxis->SetPos('max'); $graph->yaxis->SetTickSide(SIDE_LEFT); $histo->SetFillgradient('#8080FF','#D5EAFF',GRAD_WIDE_MIDVER); $histo->value->Show(); $histo->value->SetFormat('%d'); $histo->SetValuePos('center'); $graph->xaxis->SetTickLabels($lib); $graph->xaxis->SetTextLabelInterval(1); $graph->title->SET("Histogramme des pages visitées par systeme d'exploitation"); $graph->stroke(); ?>