bonjour,
c'est la premiere fois que je vais essayé d'afficher un graph a partir d'un base mysql existante
voila mon code
merci pour votre aide le probleme est en gras
Modifié par timo (02 Jul 2009 - 09:34)
c'est la premiere fois que je vais essayé d'afficher un graph a partir d'un base mysql existante
voila mon code
<?php
require_once "Artichow/BarPlot.class.php";
$graph = new Graph(400, 400);
$graph->setAntiAliasing(TRUE);
//connection base
$connection= mysql_connect("localhost","root","");
mysql_select_db("totaldvpt") or die(mysql_error());
$req= mysql_query("SELECT PREV, OCT,NOV,DECE,JANV,FEV,MARS,AVRIL,MAI,JUIN,JUILLET,AOUT,SEPT,TOTAL FROM test_excel WHERE SARL_DELAIR = 'CA. lubrifiant' ");
//les valeur a afficher dans mon graph
$valeur= array();
while($t= mysql_fetch_array($req))
{
[b] ici je ne sais pas koi mettre, aucune idée !!!!!![/b]
}
$plot = new BarPlot($valeur);
$plot->setBarColor(
new Color(250, 230, 180)
);
$plot->setSpace(
5, /* Gauche */
5, /* Droite */
NULL, /* Haut */
NULL /* Bas */
);
$plot->barShadow->setSize(3);
$plot->barShadow->setPosition(SHADOW_RIGHT_TOP);
$plot->barShadow->setColor(new Color(180, 180, 180, 10));
$plot->barShadow->smooth(TRUE);
$graph->add($plot);
$graph->draw();
?>
merci pour votre aide le probleme est en gras
Modifié par timo (02 Jul 2009 - 09:34)