Sign in to follow this  
rawness

How to Order Data in Pie Charts

Recommended Posts

I need to specify the order tyhat data is plotted on a pie chart - I have 4 labels 1. Label1 2. Label2 etc. I can control the start angle, how do I force the order that data is displayed? Using Pie2D.swf, coldfusion.

 

Thanks in advance.

 

 

Share this post


Link to post
Share on other sites
Guest Rajroop

Hey Rick,

 

 

 

Welcome! :)

 

 

 

The order of the datasets would depend on the order in which they are slated/specified in the XML.

 

 

 

In case this doesn't help, could you please post a snapshot of your desired output or send us a elaborate account of what exactly you are looking for in terms of the display of the datasets?

 

 

 

Looking forward to your reply/feedback on this. :P

Share this post


Link to post
Share on other sites

Here's my xml

<chart caption='Performance Improvement Framework' bgColor='FFFFFF' showShadow='1' captionPadding='0' showValues='0' animation ='0' showPercentageValues='0'><set label='1. Plan' value='#session.val1#' /><set label='2. Execute' value='#session.val2#' /><set label='3. Support' value='#session.val3#' /> <set label='4. Monitor' value='#session.val4#' /></chart>

and here's the output:

5d5f493a-fb47-4d66-8227-e304.jpg

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello,

In order to specify the order in which the pie slices are to be placed please placethe set elements in that particular order.

Suppose, you want the labels to be ordered as Label 2, label 1, label 3, label 4 in anti-clockwise direction place the set elements in the follwing order:

<set label='2. Execute' value='7' />

<set label='1. Plan' value='6' />

<set label='3. Support' value='5' />

<set label='4. Monitor' value='7' /> 

Again, if you want to view the labels as label 1, label 2 , label 3, label 4 in clockwise direction place the <set> elements in the following manner:

<set label='4. Monitor' value='7' /> 

<set label='3. Support' value='5' />

<set label='2. Execute' value='7' />

<set label='1. Plan' value='6' />

I hope this helps you. If you need further help on this please specify the order in which you wish to place the values so that we can help you solve the issue.as early as possible.

 

Share this post


Link to post
Share on other sites

I did that! The xml above shows that I placed it in this order:

<set label='1. Plan' value='#session.val1#' />
<set label='2. Execute' value='#session.val2#' />
<set label='3. Support' value='#session.val3#' /> 
<set label='4. Monitor' value='#session.val4#' />

...but it didn't display that way.

Share this post


Link to post
Share on other sites
Guest Madhumita

Hi,

Please do let us know if the solutin worked for you.

Till then, happy FusionCharting. :)

Share this post


Link to post
Share on other sites

Thanks for the above post, I am now ordering my pie slices in order.

However, how do I control the start angle of the first pie slice? In the below pie, I want scope7 (the largest slice) to appear with its left side at 0 degrees to the vertical (ie, at 12 0'clock). Can this be controlled?

ad299170-ef3e-49b7-8139-84ef.gif

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this