On Jan 25, 3:43 am, David Rodger <[email protected]> wrote:
> Hi There
>
> I have an error generated from this code for an annotated timeline
> "Script error. (,0)".
>
> I know I am missing a very simple element of the code but I cant seem
> to put my finger on it. I would really like someones help if possible.
>
> Heres the code (with spreadsheet taken out)
>
> <head>
> <script type="text/javascript" src="http://www.google.com/jsapi";></
> script><script type="text/javascript">
>     google.load('visualization', '1', {packages:
> ['annotatedtimeline']});
>     function  drawVisualization() {
>    // Visualization API is loaded, fetch data  from spreadsheet.
>    var query = new google.visualization.Query('GOOGLE SPREADSHEET
> HERE');
>
>    query.send(handleQueryResponse);
>
> }
>
> function handleQueryResponse(response) {
>
>   if (response.isError()) {
>     alert('Error in query: ' + response.getMessage() + ' ' +
> response.getDetailedMessage());
>     return;
>   }
>
>    // Fetch was successful, extract  datatable
>    var data = response.getDataTable();
>
>       var annotatedtimeline = new
> google.visualization.AnnotatedTimeLine(
>           document.getElementById('visualization'))
>       annotatedtimeline.draw(data, {'displayAnnotations': 'true',
> legendPosition: 'newRow', dateFormat:"MMM, yy", displayExactValues:
> true });
>     }
>
>     google.setOnLoadCallback(drawVisualization);
>   </script></head><div id="visualization" style="width: 670px; height:
> 400px;">
>     &nbsp;</div>

For this line

var annotatedtimeline = new
google.visualization.AnnotatedTimeLine(
          document.getElementById('visualization'))

Do you not need a ; at the end?

-- 
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