View unanswered posts | View active topics It is currently Sat Apr 27, 2024 10:04 pm



Reply to topic  [ 1 post ] 
drawPieLegend Alignment 
Author Message
New pChart user
New pChart user

Joined: Sun Oct 02, 2011 3:17 pm
Posts: 1
Post drawPieLegend Alignment
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.


Sun Oct 02, 2011 3:22 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron