This code works great.
It just can't work locally.
Try putting it on a webserver.

- VizBoy.

On Thu, Jan 22, 2009 at 2:51 AM, jago <[email protected]> wrote:

>
> Here is the formatted code if it helps tracking down the problem.
>
> <html>
>  <head>
>    <script type='text/javascript' src='http://www.google.com/jsapi'></
> script>
>    <script type='text/javascript'>
>      google.load('visualization', '1', {packages:['motionchart']});
>      google.setOnLoadCallback(drawChart);
>      function drawChart() {
>                var chart = new google.visualization.MotionChart
> (document.getElementById('chart_div'));
>                var json_data = new google.visualization.DataTable(
>                        {
>                                cols: [
>
>  {id:'motion_chart_title',label:'Motion Chart
> Title',type:'string'},
>                                        {id:'point_in_time',label:'Point in
> Time',type:'date'},
>                                        {id:'value_1',label:'Value
> 1',type:'number'},
>                                        {id:'value_2',label:'Value
> 2',type:'number'},
>                                        {id:'text_1',label:'Text
> 1',type:'string'}
>                                ],
>                                rows: [
>                                        {c:[{v:'Apples'}, {v:new
> Date(1988,0,0)}, {v:1000}, {v:300},
> {v:'East'}]},
>                                        {c:[{v:'Oranges'}, {v:new
> Date(1988,0,0)}, {v:950}, {v:200},
> {v:'West'}]},
>                                        {c:[{v:'Bananas'}, {v:new
> Date(1988,0,0)}, {v:300}, {v:250},
> {v:'West'}]},
>
>                                        {c:[{v:'Apples'}, {v:new
> Date(1988,1,3)}, {v:1200}, {v:400},
> {v:'East'}]},
>                                        {c:[{v:'Oranges'}, {v:new
> Date(1988,1,3)}, {v:900}, {v:150},
> {v:'West'}]},
>                                        {c:[{v:'Bananas'}, {v:new
> Date(1988,1,3)}, {v:788}, {v:617},
> {v:'West'}]}
>                                ]
>                        },
>                0.5);
>
>                chart.draw(json_data, {height:400,width:500});
>        }
>    </script>
>  </head>
>
>  <body>
>         <div id='chart_div' style='overflow:auto; width:500px;
> 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