Calculating stats for multiple choice answers.

38 views
Skip to first unread message

John Maris

unread,
Jun 13, 2012, 4:01:10 AM6/13/12
to google-visua...@googlegroups.com
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?

asgallant

unread,
Jun 13, 2012, 9:52:39 AM6/13/12
to google-visua...@googlegroups.com
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.
Reply all
Reply to author
Forward
0 new messages