5 order by `nb` desc ;"; if (isset($debug[2]) && $debug[2] == '1' ) { $debugMsg .=monDebug(2, ['reqSelect' => $reqSelect],'graphPays');} $resConn=$idPdo->query($reqSelect); $l=0; while ($tbP=$resConn->fetch(PDO::FETCH_ASSOC)) { $data[$l]=$tbP['nb']; $lib[$l]=$tbP['ip']; // echo '$data[' .$l. ']=' .$data[$l]; $l++; } $largeur = 470; $hauteur = 1400; if(count($lib)> 60) $hauteur = 18 * 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); // gauche-droit-haut-bas $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 du nombre de revisite par IP > 5"); $graph->stroke(); ?>