Hello,
When I want to create a pie chart, the legend of the second element is shifted by one pixel from the first.
Code:
<?php
require dirname(__FILE__).'/class/pChart/pData.class.php';
require dirname(__FILE__).'/class/pChart/pDraw.class.php';
require dirname(__FILE__).'/class/pChart/pPie.class.php';
require dirname(__FILE__).'/class/pChart/pImage.class.php';
$pData = new pData();
$pData->addPoints(array(60, 40));
$pData->setSerieDescription("Status");
$pData->addPoints(array("FirstElement", "SecondElement"), "Labels");
$pData->setAbscissa("Labels");
$Picture = new pImage(210, 150, $pData);
$Picture->setFontProperties(array("FontName" => "./fonts/verdana.ttf", "FontSize" => 8, "R" => 51 , "G" => 51, "B" => 51));
$PieChart = new pPie($Picture, $pData);
$PieChart->setSliceColor(0, array("R" => 0, "G" => 204, "B" => 51));
$PieChart->setSliceColor(1, array("R" => 255, "G" => 51, "B" => 0));
$PieChart->draw3DPie(105, 70, array("WriteValues" => TRUE, "Border" => TRUE));
$PieChart->drawPieLegend(35, 130, array("Style" => LEGEND_NOBORDER, "Mode" => LEGEND_HORIZONTAL));
$Picture->autoOutput("status.png");
?>
I've made perhaps a mistake ?
Thank you for this excellent library.
Regards.