62 lines
1.6 KiB
PHP
62 lines
1.6 KiB
PHP
<?php
|
|
include_once(realpath(dirname(__FILE__)) . "/../../../../fonctions/authplugins.php");
|
|
|
|
autorisation("statsplus");
|
|
|
|
?>
|
|
<?php
|
|
|
|
|
|
include_once(realpath(dirname(__FILE__)) . "/../../../../classes/Commande.class.php");
|
|
include_once(realpath(dirname(__FILE__)) . "/../../../../classes/Venteprod.class.php");
|
|
include_once(realpath(dirname(__FILE__)) . "/../calc/calc_heures.php");
|
|
|
|
|
|
$mois = date("m");
|
|
$annee = date("Y");
|
|
$values = array();
|
|
$h = array();
|
|
|
|
|
|
for($i=0;$i<24;$i++){
|
|
|
|
$values[] = ca($i, 100, 1);
|
|
if(strlen($i) == 1)
|
|
$h[] = "0" . $i;
|
|
else
|
|
$h[] = $i;
|
|
|
|
}
|
|
|
|
|
|
include_once(realpath(dirname(__FILE__)) . "/../../../../lib/artichow/LinePlot.class.php");
|
|
$graph = new archiGraph(968, 200);
|
|
$graph->border->hide();
|
|
$graph->title = new archiLabel("Progression du chiffre d'Affaires par heure.",new archiFileFont(ARTICHOW_FONT.'/Arial', 10));
|
|
|
|
$plot = new archiLinePlot($values);
|
|
// $plot->setBackgroundColor(new archiColor(240, 240, 240));
|
|
$plot->hideLine(TRUE);
|
|
$plot->setFillColor(new archiColor(180, 180, 180, 75));
|
|
//$plot->grid->setBackgroundColor(new archiColor(235, 235, 180, 60));
|
|
$plot->grid->hideVertical();
|
|
|
|
$plot->yAxis->setLabelPrecision(2);
|
|
$plot->xAxis->setLabelText($h);
|
|
|
|
$plot->mark->setType(archiMark::IMAGE);
|
|
$plot->mark->setImage(new archiFileImage("../gfx/point_graph.png"));
|
|
|
|
$plot->label->set($values);
|
|
$plot->label->setColor(new archiColor(236, 128, 0));
|
|
$plot->label->move(0, -12);
|
|
$plot->label->setFont(new archiFileFont(ARTICHOW_FONT.'/Arial', 8));
|
|
|
|
|
|
$plot->label->setPadding(3, 1, 1, 0);
|
|
|
|
$plot->setSpace(2, 2, NULL, NULL);
|
|
|
|
$graph->add($plot);
|
|
$graph->draw();
|
|
?>
|