[JpGraph] Problème d'affichage de valeurs
Bonjour,
Un souci tout bête, je n'arrive pas à faire afficher les valeurs sur mon graphes alors que je rajoute bien le $lplot->value->Show();
Voici mon 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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
<?php // content="text/plain; charset=utf-8"
// 2 : LINE PLOTS WITH VALUE
require_once ('jpgraph/jpgraph.php');
require_once ('jpgraph/jpgraph_line.php');
require_once ('configBDD.php');
// Setup the graph
$graph = new Graph($width,$height);
$graph->SetScale("textlin");
if($titre){
$graph->title->Set("$titre_graph");
}
if(!$preview){
$graph->SetMargin(40,40,60,40);
$graph->title->SetFont(FF_DEFAULT,FS_BOLD,12); //FF_FONT2, FS_BOLD
$graph->SetTitleBackground($couleurBandeau,TITLEBKG_STYLE3,TITLEBKG_FRAME_NONE,'black');
}
$graph->yaxis->HideTicks(false,false);
$graph->xgrid->Show();
$graph->xgrid->SetLineStyle("solid");
$graph->xaxis->SetTickLabels($y);
$graph->xgrid->SetColor('#E3E3E3');
foreach ($xy as $key => $value) {
$lplot = new LinePlot(array_values($xy[$key]));
$lplot->value->Show(); // FONCTIONNE PAS !!!
if(!$preview){
$lplot->SetLegend($key);
}
$aGroupBarPlot[] = $lplot;
}
$graph->Add($aGroupBarPlot);
if($preview){
$graph->stroke();
}else{
// Output line
$graph->stroke($img);
$graph->img->Stream($img);
// Send it back to browser
$graph->img->Headers();
$graph->img->Stream();
}
?> |