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
|
include "Artichow-php4-5/BarPlot.class.php";
$graph=new Graph(400,400); // tracer le cadre pour le graph (instensier l'objet)
$graph->setAntiAliasing(TRUE);//pour le trait soi lisse ()
$values=array(19,42,15,-25,3);// les valeurs à ploter
$plot=new BarPlot($values); // creation de l'objet histogramme avec $plot=
//$plot=new LinePlot($values); // creation de l'objet histogramme avec $plot=
//habillage
$plot->setBarColor(
new Color(250,230,180)
);
$plot->setSpace(5,5,NULL,NULL); // l'espace tout autour pour quelle ne colle pas au cadre
$plot->barshadow->setSize(3); //barchaddow c'est l'ombre porté
$plot->barshadow->setPosition(Shadow::RIGHT_TOP);
$plot->barshadow->setColor(new Color(180,180,180,10));
$plot->barshadow->smooth(TRUE);
//fin habillage
$graph->add($plot);//maintenant ajouter l'histogram au graph créé
$graph->draw();// tracer le graphe
?> |
Partager