$reqSelect, 'bdd' => $bdd, 'modeTest' => $modeTest, '$_SESSION[modeTest]' => $_SESSION['modeTest']], 'graphPages.php'); } $resConn=$idPdo->query($reqSelect); $l=0; while ($tbML=$resConn->fetch(PDO::FETCH_ASSOC)) { $data[$l]=intval($tbML['compteur']); $lib[$l]=$tbML['idPage']; if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['$lib[$l]' => $lib[$l], '$data[$l]' => $data[$l] ], '');} $l++; } $largeur = 500; $hauteur = 500; $graph = new Graph($largeur, $hauteur, "auto"); // Linear scale. Both X and Y axis // Logarithmic scale. Both X and Y axis // Text scale. Only on X axis // Integer scale. X and Y axis $graph->setScale("textlin"); $barPlot = new BarPlot($data); $graph->add($barPlot); $barPlot->SetWidth(0.7); $barPlot->SetFillgradient('darkgreen','#D5EAFF',GRAD_WIDE_MIDVER); $barPlot->value->Show(); $barPlot->value->SetFormat('%d'); $barPlot->SetValuePos('top'); $barPlot->SetYBase(4); $barPlot->value->SetMargin(150); $barPlot->value->HideZero(); $barPlot->value->SetColor("darkgreen","darkred"); // $graph->SetBackgroundImage("mer_antilles_fond.jpg",BGIMG_FILLFRAME); // $graph->img->SetAntiAliasing("white"); $graph->SetShadow(); // gauche-droit-haut-bas $graph->Set90AndMargin(130,20,30,20); // Axe des ordonées $graph->xaxis->SetPos('SIDE_LEFT'); $graph->xaxis->SetLabelMargin(10); $graph->xaxis->SetColor('black','blue'); // Axe des abscisses $graph->yaxis->SetTextLabelInterval(2); $graph->yaxis->SetLabelMargin(-15); $graph->yaxis->scale->SetGrace(0); $graph->yaxis->SetPos('max'); $graph->yaxis->SetTextLabelInterval(2); $graph->xaxis->SetTickLabels($lib); $graph->title->SET("Nombre de visites par page / 'toute date'"); $graph->stroke(); ?>