View unanswered posts | View active topics It is currently Wed May 08, 2024 7:03 am



Reply to topic  [ 2 posts ] 
pie chart label colors? 
Author Message
New pChart user
New pChart user

Joined: Wed Apr 06, 2011 8:42 pm
Posts: 3
Post pie chart label colors?
Should it be possible to set the colors of the pie chart labels? It seems that the setFontProperties should work to accomplish this task, and in this example I am trying to set it to a red color.
I have other setFontProperties in earlier lines of the script, but I am thinking that the values get replaced each time I set the array - which is what I want, because I want the properties to be used for a particular part of the chart (i.e. chart tile, legend, labels etc.)


Code:
/* Set the pie slice label properties - using FM XAxis properties */
$myPicture->setFontProperties(array("FontName"=>"../pChart/fonts/Verdana.ttf","FontSize"=>10, "R"=>255,"G"=>0,"B"=>0));
/* Draw the (3D) pie chart */
$PieChart->draw3DPie(231,176,array("Radius"=>132,"DrawLabels"=>TRUE,"DataGapAngle"=>0,"DataGapRadius"=>6,"Border"=>TRUE));
/* Render the picture (choose the best way) */
$myPicture->autoOutput('chart1.png');


I am using pChart 2.10.

_________________
David Simpson
http://www.fmpromigrator.com


Wed Apr 06, 2011 8:52 pm
Profile
Site Admin
Site Admin
User avatar

Joined: Thu Dec 02, 2010 2:31 pm
Posts: 409
Location: France
Post Re: pie chart label colors?
You have to upgrade to the 2.1.1 to have more labelling options :

ValueR,ValueG,ValueB,ValueAlpha

LabelR,LabelG,LabelB,LabelAlpha

Kind regards,
JD.


Thu Apr 07, 2011 10:44 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 12 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