Here is the source code made by me in Play Ground and it works.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/
>
<title>
Motion Chart
</title>
<script type="text/javascript" src="http://www.google.com/jsapi"></
script>
<script type="text/javascript">
google.load('visualization', '1', {packages: ['motionchart']});
</script>
<script type="text/javascript">
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);
visualization = new
google.visualization.MotionChart(document.getElementById('motion'));
visualization.draw(data);
}
google.setOnLoadCallback(drawVisualization);
</script>
</head>
<body>
<div id="motion"></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.