Salut tout le monde !
Bon voilà j'ai un petit problème avec JPGraph...
Je veux juste créer un graphe sous forme de ligne qui représente l'évolution d'un classement d'un joueur qui va du numéro 1 à un numéro X.
Voici ce que j'ai fait :
[ Lien ]
Mais le seul problème c'est que la valeur du classement est négatif puisque j'ai inversé le graphe pour l'avoir dans le sens décroissant...
Si quelqu'un a compris mon problème et qu'il peut m'aider ça serait sympa 
Voici mon code :
<?php
include ("outils/jpgraph/source/jpgraph.php");
include ("outils/jpgraph/source/jpgraph_line.php");
include ("outils/jpgraph/source/jpgraph_error.php");
require_once("connexion_base.php");
// Callback to negate the argument
function _cb_negate($aVal) {
return round(-$aVal);
}
//fonction d'affichage du graphe pour l'évolution d'UN joueur
function evolution()
{
$joueur=$_GET["joueur"];
$titre="Evolution du classement de ".$joueur;
$datay[]=new array(267,163);
$datax[]=new array("06/12/2003","07/12/2003");
// Negate all data
$n = count($datay);
for($i=0; $i<$n; ++$i)
{
$datay[$i] = round(-$datay[$i]);
}
$graph = new Graph($largeur,400,"auto");
$graph->img->SetMargin(40,40,40,40);
$graph->img->SetAntiAliasing();
$graph->SetScale("textlin");
$graph->SetShadow();
$graph->title->Set($titre);
$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->SetTickLabels($datax);
// Use 20% "grace" to get slightly larger scale then min/max of data
$graph->yscale->SetGrace(20);
$graph->yaxis->SetLabelFormatCallback("_cb_negate");
$p1 = new LinePlot($datay);
$p1->mark->SetType(MARK_FILLEDCIRCLE);
$p1->mark->SetFillColor("red");
$p1->mark->SetWidth(4);
$p1->value->show();
$p1->SetColor("blue");
$p1->SetCenter();
$graph->Add($p1);
$graph->Stroke();
}
evolution();
?>