70 lines
1.8 KiB
PHP
70 lines
1.8 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_jours.php");
|
|
|
|
|
|
$mois = date("m");
|
|
$annee = date("Y");
|
|
$values = array();
|
|
$j = array();
|
|
|
|
|
|
$debut = mktime (0, 0, 0, 1, 1, date("Y"));
|
|
$now = mktime();
|
|
|
|
for($i=$debut; $i<=$now; $i+=86400){
|
|
$jour = date("w", $i);
|
|
$liste[$jour][] = date("Y-m-d", $i);
|
|
}
|
|
|
|
|
|
for($i=1;$i<7;$i++){
|
|
|
|
$values[] = ca($i, $liste, 100, 1);
|
|
$j[] = trouve_jour($i);
|
|
|
|
}
|
|
|
|
$values[] = ca(0, $liste, 100, 1);
|
|
$j[] = trouve_jour(0);
|
|
|
|
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 jour.",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($j);
|
|
|
|
$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();
|
|
?>
|