I've reported this before. The Official Party Line is that this isn't a bug,
but rather desired behaviour. Basically, the pie chart type always expects
data points to add up to 100 (as in 100 percent). 198 and 933 are both over
100, so they both get cropped down to equal portions of a 100% pie, hence
the idiotic result you get.

Workaround: You have to actually divide the data by the total and calculate
the percentages yourself. Instead of 933 and 198, pass it 82.49 and 17.51.

Yes, it's stupid. But that's how Google handles pie charts, evidently.

On Wed, Aug 26, 2009 at 2:01 PM, Tim <[email protected]> wrote:

>
> Hi, first off, thanks for providing this product, it is probably the
> fastest and easier charting library I have used. I finished up a small
> project measuring SLA and I have a simple pie chart, two data points,
> failed is 198, passed is 933. When you graph it as a pie chart, it is
> split at 50% when it should be split at about 18%. I have seen this
> for a few weeks and I verified it is not in my code.
>
> URL to chart:
>
> http://chart.apis.google.com/chart?chd=t%3A933%2C198&cht=p&chs=450x250&chtt=Initial%20Response%20Overall&chts=000000%2C14&chl=Passed%20SLA%3A%20933%7CFailed%20SLA%3A%20198&chco=00FF00%2CFF0000&chf=bg%2Cs%2CFFFFFF
>
> Just wanted to give you guys a heads up!
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Chart API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-chart-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to