[JpGraph] Problème création de graph
bonjour,
J'ai un souci avec mon graph il me met une erreur : l'image contient une erreur pourtant mon code est simple mais je ne vois pas cette fichue erreur
voici le code
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| <?php
$xy = $this->data2;
require_once ('jpgraph/jpgraph.php');
require_once ('jpgraph/jpgraph_bar.php');
$graph = new Graph(640,480,'auto');
$graph->SetScale("textlin");
$plot = array();
foreach ($xy as $key => $value){
$bplot = new BarPlot($xy[$key]);
$plot[] = $bplot;
}
$gplot = new GroupBarPlot($plot);
$graph->add($gplot);
$graph->Stroke();
?> |
Voici un var_dump de xy :
Citation:
array
'Exemple' =>
array
'a' => string '10' (length=2)
'b' => string '15' (length=2)
'c' => string '20' (length=2)
'd' => string '25' (length=2)
'e' => string '30' (length=2)
'Jeu test 2' =>
array
'a' => string '14' (length=2)
'b' => string '13' (length=2)
'c' => string '12' (length=2)
'd' => string '15' (length=2)
'e' => string '16' (length=2)
Merci de m'aider à trouver une solution