Can anyone take a look at this for me and tell me what's missing/
incorrect? Trying to get a motion chart of organization ratings. Gave
up querying mysql, and hard coded the rows, but still no luck in the
Google Code Playground. Just says
"google.setOnLoadCallback(drawVisualization);"

I have read other documentation on querying but found it hard to
understand. Are there any step-by-step guides or video tutorials that
I can access?

Thanks in advance!

<html>
   <head>
     <script type="text/javascript" src="https://www.google.com/
jsapi"></script>
     <script type="text/javascript">
       google.load('visualization', '1', {'packages':
['motionchart']});
       google.setOnLoadCallback(drawVisualization);
       function drawVisualization() {
        var JSONObject = {cols:
[{"id":"rating","label":"Rating","type":"string"},
{"id":"time","label":"Quarter","type":"string"},
{"id":"count","label":"Count","type":"number"}],rows:[{c:[{v:"Five"},
{v:"2008Q1"},{v:1619}]},{c:[{v:"Four"},{v:"2008Q1"},{v:3201}]},{c:
[{v:"Not Available"},{v:"2008Q1"},{v:29}]},{c:[{v:"One"},{v:"2008Q1"},
{v:3219}]},{c:[{v:"Three"},{v:"2008Q1"},{v:2997}]},{c:[{v:"Too few"},
{v:"2008Q1"},{v:8}]},{c:[{v:"Two"},{v:"2008Q1"},{v:2915}]},{c:
[{v:"Five"},{v:"2008Q4"},{v:1619}]},{c:[{v:"Four"},{v:"2008Q4"},{v:
3201}]},{c:[{v:"Not Available"},{v:"2008Q4"},{v:29}]},{c:[{v:"One"},
{v:"2008Q4"},{v:3219}]},{c:[{v:"Three"},{v:"2008Q4"},{v:2997}]},{c:
[{v:"Too few"},{v:"2008Q4"},{v:8}]},{c:[{v:"Two"},{v:"2008Q4"},{v:
2915}]},{c:[{v:"Five"},{v:"2009Q1"},{v:1576}]},{c:[{v:"Four"},
{v:"2009Q1"},{v:3258}]},{c:[{v:"Not Available"},{v:"2009Q1"},{v:16}]},
{c:[{v:"One"},{v:"2009Q1"},{v:3195}]},{c:[{v:"Three"},{v:"2009Q1"},{v:
2997}]},{c:[{v:"Two"},{v:"2009Q1"},{v:2911}]},{c:[{v:"Five"},
{v:"2009Q2"},{v:1644}]},{c:[{v:"Four"},{v:"2009Q2"},{v:3276}]},{c:
[{v:"Not Available"},{v:"2009Q2"},{v:16}]},{c:[{v:"One"},{v:"2009Q2"},
{v:3096}]},{c:[{v:"Three"},{v:"2009Q2"},{v:2967}]},{c:[{v:"Two"},
{v:"2009Q2"},{v:2935}]},{c:[{v:"Five"},{v:"2009Q3"},{v:1654}]},{c:
[{v:"Four"},{v:"2009Q3"},{v:3388}]},{c:[{v:"Not Available"},
{v:"2009Q3"},{v:19}]},{c:[{v:"One"},{v:"2009Q3"},{v:2964}]},{c:
[{v:"Three"},{v:"2009Q3"},{v:2951}]},{c:[{v:"Two"},{v:"2009Q3"},{v:
2929}]},{c:[{v:"Five"},{v:"2009Q4"},{v:1704}]},{c:[{v:"Four"},
{v:"2009Q4"},{v:3465}]},{c:[{v:"Not Available"},{v:"2009Q4"},{v:16}]},
{c:[{v:"One"},{v:"2009Q4"},{v:2827}]},{c:[{v:"Three"},{v:"2009Q4"},{v:
2950}]},{c:[{v:"Two"},{v:"2009Q4"},{v:2917}]},{c:[{v:"Five"},
{v:"2010Q1"},{v:1902}]},{c:[{v:"Four"},{v:"2010Q1"},{v:3529}]},{c:
[{v:"Not Available"},{v:"2010Q1"},{v:14}]},{c:[{v:"One"},{v:"2010Q1"},
{v:2524}]},{c:[{v:"Three"},{v:"2010Q1"},{v:2965}]},{c:[{v:"Two"},
{v:"2010Q1"},{v:2949}]},{c:[{v:"Five"},{v:"2010Q2"},{v:1929}]},{c:
[{v:"Four"},{v:"2010Q2"},{v:3562}]},{c:[{v:"Not Available"},
{v:"2010Q2"},{v:11}]},{c:[{v:"One"},{v:"2010Q2"},{v:2445}]},{c:
[{v:"Three"},{v:"2010Q2"},{v:2982}]},{c:[{v:"Two"},{v:"2010Q2"},{v:
2916}]},{c:[{v:"Five"},{v:"2010Q3"},{v:1916}]},{c:[{v:"Four"},
{v:"2010Q3"},{v:3535}]},{c:[{v:"One"},{v:"2010Q3"},{v:2393}]},{c:
[{v:"Three"},{v:"2010Q3"},{v:3001}]},{c:[{v:"Two"},{v:"2010Q3"},{v:
2855}]},{c:[{v:"Five"},{v:"2010Q4"},{v:1925}]},{c:[{v:"Four"},
{v:"2010Q4"},{v:3564}]},{c:[{v:"Not Available"},{v:"2010Q4"},{v:11}]},
{c:[{v:"One"},{v:"2010Q4"},{v:2422}]},{c:[{v:"Three"},{v:"2010Q4"},{v:
3024}]},{c:[{v:"Two"},{v:"2010Q4"},{v:2884}]},{c:[{v:"Five"},
{v:"2011Q1"},{v:1922}]},{c:[{v:"Four"},{v:"2011Q1"},{v:3569}]},{c:
[{v:"Not Available"},{v:"2011Q1"},{v:10}]},{c:[{v:"One"},{v:"2011Q1"},
{v:2419}]},{c:[{v:"Three"},{v:"2011Q1"},{v:3024}]},{c:[{v:"Two"},
{v:"2011Q1"},{v:2885}]},{c:[{v:"Five"},{v:"2011Q3"},{v:2096}]},{c:
[{v:"Four"},{v:"2011Q3"},{v:3720}]},{c:[{v:"Not Available"},
{v:"2011Q3"},{v:4}]},{c:[{v:"One"},{v:"2011Q3"},{v:2193}]},{c:
[{v:"Three"},{v:"2011Q3"},{v:2879}]},{c:[{v:"Two"},{v:"2011Q3"},{v:
2813}]}]};

         var data = new google.visualization.DataTable(JSONObject,
0.5);

         var chart = new
google.visualization.MotionChart(document.getElementById('chart_div'));

     }
     </script>
   </head>

   <body>
     <div id="chart_div" style="width: 600px; height: 400px;"></div>
   </body>
 </html>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization 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-visualization-api?hl=en.

Reply via email to