Bonjour,
Je souhaite utiliser deux draws successifs.
$graph->draw();
$graph->draw('zaza.png');
Le premier s'affiche parfaitement lors du chargement de ma page mais le second, enregistré dans un fichier, n'est pas correctement créé. En fait le graphique en lui même est correctement généré mais les légendes sont inscrites en double de façon décalée.
Ce problème est constaté que ce soit pour un histogramme ou un camembert. Si l'on change l'ordre des draw (enregistrement fichier avant affichage écran) le problème est inversé, c'est l'image à l'écran qui est incorrecte.
Je travaille avec php4.
Je cherche donc une correction à apporter ou une autre méthode à utiliser.
En vous remerciant d'avance!
Code du graphique en question :
require_once "Artichow/BarPlot.class.php";
$graph = new Graph(430, 430);
$graph->setAntiAliasing(TRUE);
$values = array(1, 2, 3, 4, 5, 6);
$plot = new BarPlot($values);
$plot->setBarGradient(
new LinearGradient(
new Color(150, 150, 210, 0),
new Color(230, 230, 255, 30),
0
)
);
$plot->setSpace(5, 5, NULL, NULL);
$plot->title->set("Ventilation des gagnées par catégorie");
$plot->title->setFont(new TuffyBold(11));
$plot->title->border->show();
$plot->title->setBackgroundColor(new Color(255, 255, 255, 25));
$plot->title->setPadding(4, 4, 4, 4);
$plot->title->move(0, 0);
$plot->barShadow->setSize(3);
$plot->barShadow->setPosition(SHADOW_RIGHT_TOP);
$plot->barShadow->setColor(new Color(180, 180, 180, 10));
$plot->barShadow->smooth(TRUE);
$y = array(
'1',
'2',
'3',
'4',
'5',
'6'
);
$plot->xAxis->setLabelText($y);
$plot->xAxis->label->setFont(new TuffyBold(7));
$plot->xAxis->label->setAngle(0);
$graph->add($plot);
$graph->draw();
$graph->draw('zaza.png');