Hi again
I noticed another minor bug on radar charts, and it's visible in my first post too ^^
The color of the axis changes :
In the bottom-right corner (in fact on the part with the labels), the color is darker than on the rest of the chart.
I don't know if it's on purpose or not ^^
Here is a code for a radar chart :
Code:
$etiquettes = array('1','2','3','4');
// $etiquettes2 = array('1','2','3','4','5');
$valeurs = array('Serie 1', array(1,2,1,2));
// $valeurs2 = array('Serie 1', array(1,2,1,2,1));
$titre = 'Titre';
$MyData = new pData();
$MyData->addPoints($valeurs[1],"Serie1");
$MyData->setSerieDescription("Serie1",$valeurs[0]);
// $MyData->addPoints($valeurs2[1],"Serie1");
// $MyData->setSerieDescription("Serie1",$valeurs2[0]);
/* Définition des noms de branches */
$MyData->addPoints($etiquettes,"Labels");
// $MyData->addPoints($etiquettes2,"Labels");
$MyData->setAbscissa("Labels");
/* Création de l'objet pChart */
$myPicture = new pImage(400,350,$MyData);
$RectangleSettings = array("R"=>180,"G"=>180,"B"=>180,"Alpha"=>100);
/* Titre du graph */
$myPicture->setFontProperties(array("FontName"=>"./pChart2/fonts/verdana.ttf","FontSize"=>10));
$myPicture->drawText(195,20,$titre,array("R"=>100,"G"=>100,"B"=>100,"Align"=>TEXT_ALIGN_MIDDLEMIDDLE));
$myPicture->drawRoundedRectangle(5,5,395,40,5,array("R"=>100,"G"=>100,"B"=>100));
/* Définition de la police par défaut */
$myPicture->setFontProperties(array("FontName"=>"./pChart2/fonts/verdana.ttf","FontSize"=>9,"R"=>80,"G"=>80,"B"=>80));
/* Création de l'objet pRadar */
$SplitChart = new pRadar();
/* Dessin du graph radar */
$myPicture->setGraphArea(10,50,390,310);
$Options = array("SegmentHeight"=>1,"Segments"=>5,"DrawPoly"=>true,"DrawPoints"=>false,"Layout"=>RADAR_LAYOUT_STAR,"LabelsBGR"=>240,"LabelsBGG"=>240,"LabelsBGB"=>240,"LabelPos"=>RADAR_LABELS_HORIZONTAL,"BackgroundGradient"=>array("StartR"=>255,"StartG"=>255,"StartB"=>255,"StartAlpha"=>100,"EndR"=>235,"EndG"=>235,"EndB"=>235,"EndAlpha"=>20));
$SplitChart->drawRadar($myPicture,$MyData,$Options);
/* Sortie du graph (fichier) */
$myPicture->Render('radar.png');
If you have a solution... Again
Thanks !