You are here Support Forums
Search:  
Google Pie Chart Question
Last Post 01 Feb 2012 10:41 AM by John Crichton. 2 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
John Crichton
New Member
New Member
Posts:7

--
30 Jan 2012 10:58 AM  
Hi in your repository example for the google pie chart which uses the following code: 2010 Budget Allocation By Department 1. Could you tell me how to get the "pie slices" variable upon the total amount. For example a slice with a value of 8 would be twice the size of a slice with 4? Thanks
Richard Edwards
DNNStuff Founder
Veteran Member
Veteran Member
Posts:1207
Avatar

--
30 Jan 2012 12:05 PM  
Hi John,

I just checked out the google chart api and it looks like you can achieve that by adding &chds=a to the query string used to access the chart. For instance in the repository sample it will turn out like this, http://chart.apis.google.com/chart?chs=700x400&chd=t:329782.0000,357789.0000,242344.0000,777026.0000,876370.0000,434260.0000,561102.0000,213738.0000,0&cht=p3&chl=HR%20($329.8k)|Sales%20($357.8k)|Logistics%20($242.3k)|Manufacturing%20($777.0k)|Accounting%20($876.4k)|Customer%20Service%20($434.3k)|IT%20($561.1k)|Management%20($213.7k)|&chtt=2010+Budget+Allocation+By+Department&chts=FF0000,20&chco=FF0000,FF8040,FFFF00,00FF00,00FFFF,0000FF,800080&chds=a

Here is a link to the google chart data formats spec, http://code.google.com/apis/chart/image/docs/data_formats.html. In the example above I'm using the text with automatic scaling.

You can also try the chart wizard located here, http://code.google.com/apis/chart/image/docs/chart_wizard.html. Design the chart how you want it to appear and then used the generated code and put in the required [EACHROW] tokens and you should be good to go.


Richard Edwards
DNNStuff Founder
Did you receive excellent support? Consider leaving a testimonial
John Crichton
New Member
New Member
Posts:7

--
01 Feb 2012 10:41 AM  
Great Info. Worked like a charm. Thanks
You are not authorized to post a reply.

Active Forums 4.1
Privacy StatementTerms Of UseCopyright (c) 2004-2012 DNNStuff