These are known not to work when loaded from your local file system, as 
Flash has some security issues with that.  You have to load them from a 
webserver to get them to work, which only applies to the two Flash-based 
charts: the Annotated Timeline and Motion Charts, the other charts should 
work fine.

On Tuesday, April 22, 2014 5:16:12 AM UTC-4, Trity Webs wrote:
>
> and another sample 
> https://code.google.com/apis/ajax/playground/?hl=zh-CN#motion_chart, when 
> copy the html and load it in chrome, nothing (white) is appearing.
>
> On Monday, April 21, 2014 10:01:04 PM UTC+8, Andrew Gallant wrote:
>
> That's an odd error.  The code works fine when I run it from the Google 
> Playground, but I can't get it to work on jsfiddle.  In any event, the 
> AnnotatedTimeline charts are deprecated, and there is a replacement 
> available: 
> AnnotationCharts<https://developers.google.com/chart/interactive/docs/gallery/annotationchart>.
>   
> The replacement didn't give me an error when I used that code to draw one: 
> http://jsfiddle.net/asgallant/f67RS/
>
> On Monday, April 21, 2014 3:33:19 AM UTC-4, Trity Webs wrote:
>
> this code ,here you are:
>
> On Monday, April 21, 2014 3:31:57 PM UTC+8, Trity Webs wrote:
>
> <!--
> You are free to copy and use this sample in accordance with the terms of 
> the
> Apache license (http://www.apache.org/licenses/LICENSE-2.0.html)
> -->
>
> <!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>Google Visualization API Sample</title>
>   <script type="text/javascript" src="https://www.google.com/jsapi";></
> script>
>   <script type="text/javascript">
>     google.load('visualization', '1', {packages: ['annotatedtimeline']});
>     function drawVisualization() {
>       var data = new google.visualization.DataTable();
>       data.addColumn('date', 'Date');
>       data.addColumn('number', 'Sold Pencils');
>       data.addColumn('string', 'title1');
>       data.addColumn('string', 'text1');
>       data.addColumn('number', 'Sold Pens');
>       data.addColumn('string', 'title2');
>       data.addColumn('string', 'text2');
>       data.addRows([
>         [new Date(2008, 1 ,1), 30000, null, null, 40645, null, null],
>         [new Date(2008, 1 ,2), 14045, null, null, 20374, null, null],
>         [new Date(2008, 1 ,3), 55022, null, null, 50766, null, null],
>         [new Date(2008, 1 ,4), 75284, null, null, 14334, 'Out of Stock', 'Ran 
> out of stock on pens at 4pm'],
>         [new Date(2008, 1 ,5), 41476, 'Bought Pens', 'Bought 200k pens', 
> 66467, null, null],
>         [new Date(2008, 1 ,6), 33322, null, null, 39463, null, null]
>       ]);
>     
>       var annotatedtimeline = new google.visualization.AnnotatedTimeLine(
>           document.getElementById('visualization'));
>       annotatedtimeline.draw(data, {'displayAnnotations': true});
>     }
>     
>     google.setOnLoadCallback(drawVisualization);
>   </script>
> </
>
> ...

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to