You use 

google.load('visualization', '1', {'packages':['annotatedtimeline']});

to load the AnnotatedTimeline charts package.  This isn't needed if you use 
a ChartWrapper, though.

On Friday, June 1, 2012 1:12:09 AM UTC-4, far m wrote:
>
> Could you please tell me what packet you use? 
> Something like: 
>       google.load('visualization', '1.1', {packages: ['controls']});
>     </script>
>     <script type="text/javascript">
> google.setOnLoadCallback(drawVisualization);
>
>
>
> On Wednesday, February 15, 2012 6:45:30 AM UTC-8, asgallant wrote:
>>
>> Here's a simple example I drew up.  I don't have any google spreadsheets 
>> to work from, so you'll have to tweak it to your own needs, but the 
>> functionality is there:
>>
>> function drawChart() {
>>     var query = new google.visualization.Query('
>> http://spreadsheets.google.com/tq?key=<your spreadsheets key>&pub=1');
>>
>>     // Assumes that column:
>>     //   A is the date
>>     //   B is the first series values
>>     //   C is the first series annotations
>>     //   D is the first series annotation text
>>     //   E is the second series values
>>     //   F is the second series annotations
>>     //   G is the second series annotation text
>>     query.setQuery('SELECT A,B,C,D,E,F');
>>
>>     // Send the query with a callback function.
>>     query.send(handleQueryResponse);
>> }
>>
>> function handleQueryResponse(response) {
>>     if (response.isError()) {
>>         alert('Error in query: ' + response.getMessage() + ' ' + response
>> .getDetailedMessage());
>>         return;
>>     }
>>
>>     var data = response.getDataTable();
>>     var chart = new google.visualization.AnnotatedTimeline(document.
>> getElementById('chart_div'));
>>     chart.draw(data, {
>>         displayAnnotations: true,
>>         scaleColumns: [0, 1],
>>         scaleType: 'allfixed'
>>     });
>> }
>>
>> The charts width and height must be explicitly defined for the chart div 
>> or the draw will fail:
>>
>> <div id="chart_div" style="width: 500px; height: 300px;"></div> 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-visualization-api/-/6kZ_2bDU2OQJ.
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