I'm not quite sure what you are asking here; the bar charts have nothing to
do with percentages. If your numbers represent percentages, then it is
encumbent upon you to make sure they are calculated properly.
On Wednesday, June 13, 2012 4:01:10 AM UTC-4, John Maris wrote:
>
> My problem might be simple but i really don't know if google charts api
> calculating it the right way.
> I have a question with multiple choices and I want to create a bar chart
> with the answers.
> I'm returning a datatable from my webservice to the visualization, with
> the sum of each answer.
> A snapshot from the json:
>
> {"cols":[
>
> {"id":"choice","label":"Question","type":"string"},{"id":"sum","label":"Summary","type":"number"}
> ],
> "rows":[
> {"c":[{"v":"Answer 1"},{"v":11}]},
> {"c":[{"v":"Answer 2"},{"v":16}]},
> {"c":[{"v":"Answer 3"},{"v":12}]},
> ]
> }
>
> The percentage for each answer is calculated in conjunction with the
> total answers number by the visualization api? ( Answer / total number of
> answers )
> Is this the right way? Doesn't have to be calculated in conjunction with
> the total users answered the question?
>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-visualization-api/-/4eXRyzpx77kJ.
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-visualization-api?hl=en.