View unanswered posts | View active topics It is currently Fri Apr 19, 2024 3:26 pm



Reply to topic  [ 7 posts ] 
2dPie abilities 
Author Message
pChart user
pChart user

Joined: Tue Apr 05, 2011 1:18 pm
Posts: 4
Post 2dPie abilities
Hi,

I'm trying to display my array values inside a 2dpie ... which seems not to be possible when i look into pPie.class.php.
I've seen ability to display Labels around the pie but i still can't display values inside.

When i look in the documentation i see :

"You can write the data values setting WriteValues to TRUE or to PIE_VALUE_PERCENTAGE if you want to display the computed percentages."
and
"You can specify where the values will be written setting ValuePosition to : PIE_VALUE_INSIDE" OR "PIE_VALUE_OUTSIDE"

So i've tried :

$PieChart = new pPie($myPicture,$MyData);
$PieChart->draw2DPie(50,50,array("Radius"=>45,"Border"=>TRUE,"WriteValues"=>PIE_VALUE_PERCENTAGE,"ValuePosition"=>PIE_VALUE_INSIDE));

It would be kind if somebody can help me find what's wrong :)

Thanks


Tue Apr 05, 2011 1:32 pm
Profile
Site Admin
Site Admin
User avatar

Joined: Thu Dec 02, 2010 2:31 pm
Posts: 409
Location: France
Post Re: 2dPie abilities
Hi,

Something is missing in the documentation, you can set the WriteLabels parameters to :

- PIE_VALUE_NATURAL to have the value displayed.
- PIE_VALUE_PERCENTAGE to have the percentage.

I'll update the doc accordingly.

Kind regards,
JD.


Tue Apr 05, 2011 1:46 pm
Profile WWW
pChart user
pChart user

Joined: Tue Apr 05, 2011 1:18 pm
Posts: 4
Post Re: 2dPie abilities
Thanks for your explanation but :

$PieChart->draw2DPie(100,100,array("Radius"=>45,"Border"=>TRUE,"WriteValues"=>PIE_VALUE_PERCENTAGE));
Display nothing but empty pie
$PieChart->draw2DPie(100,100,array("Radius"=>45,"Border"=>TRUE,"DrawLabels"=>PIE_VALUE_PERCENTAGE));
Display Labels around pie with arrows
$PieChart->draw2DPie(100,100,array("Radius"=>45,"Border"=>TRUE,"WriteLabels"=>PIE_VALUE_PERCENTAGE));
WriteLabels -> NOT EXIST in pPie.class.php :) and return pie without text outside or inside

Indeed, in function draw2DPie()
I only see
$DrawLabels = isset($Format["DrawLabels"]) ? $Format["DrawLabels"] : FALSE;

You may have forget to add this ability in function
I'm surprised because it seems easier than for 3d one ?

Can you confirm that i'm right and what i'm trying to do does not yet exists in your class?


Tue Apr 05, 2011 2:41 pm
Profile
Site Admin
Site Admin
User avatar

Joined: Thu Dec 02, 2010 2:31 pm
Posts: 409
Location: France
Post Re: 2dPie abilities
I've mixed the parameters names sorry ;o)

In the 2D pie it is called WriteValues and not WriteLabels as I've written below. If I remember well, this parameter has been added in the latest 2.1.1 subversion.

Code:
$Settings=array("Radius"=>45,"Border"=>TRUE,"WriteValues"=>PIE_VALUE_NATURAL);
$PieChart->draw2DPie(100,100,$Settings);


JD.


Tue Apr 05, 2011 2:52 pm
Profile WWW
pChart user
pChart user

Joined: Tue Apr 05, 2011 1:18 pm
Posts: 4
Post Re: 2dPie abilities
I'm sorry i mean :

In your pPie.class.php in function draw2DPie() there's NO

$WriteValues declared

So it won't work

I'm using 2.1.0 for your information :)


Tue Apr 05, 2011 2:58 pm
Profile
Site Admin
Site Admin
User avatar

Joined: Thu Dec 02, 2010 2:31 pm
Posts: 409
Location: France
Post Re: 2dPie abilities
You'll have to upgrade ;o)


Tue Apr 05, 2011 2:59 pm
Profile WWW
pChart user
pChart user

Joined: Tue Apr 05, 2011 1:18 pm
Posts: 4
Post Re: 2dPie abilities
Sorry i've just read what you say about svn ...
I will get this latest revision thanks


Tue Apr 05, 2011 2:59 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

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