erreur JPGRAH
Posté : 25 août 2006, 12:51
Je veux construire un graphine a partir de donnees recuperees dans une base Mysql.
J'ai l'erreur suivante :
JpGraph Error: You have not specified a y[0] value!!
Voici un bout du code
J'ai l'erreur suivante :
JpGraph Error: You have not specified a y[0] value!!
Voici un bout du code
$data1y = array();
$data2y = array();
$data3y = array();
while($row = mysql_fetch_array($sql))
{
$data1y[] = $row[vol_oee];
$data2y[] = $row[vol_edel];
$data3y[] = $row[vol_adv];
}
$graph = new Graph(310,200);
$graph->SetScale("textlin");
$graph->SetShadow();
$graph->img->SetMargin(40,30,20,40);
$b1plot = new BarPlot($data1y);
$b1plot->SetFillColor("orange");
$b1plot->SetLegend("OEE");
$b2plot = new BarPlot($data2y);
$b2plot->SetFillColor("blue");
$b2plot->SetLegend("EDEL");
$b3plot = new BarPlot($data3y);
$b3plot->SetFillColor("green");
$b3plot->SetLegend("ADV");
// Create the grouped bar plot
$gbplot = new GroupBarPlot(array($b1plot,$b2plot,$b3plot));
Merci d'avance pour votre aide