So this is somewhat tricky but here is what happened.

When you first type something in a cell then there is an auto-detect
mechanism that identifies what it is. e.g. "1" is the number 1, "1 Jun" is
the date 06/01/2010 etc.
In the sheet example all the date cells were inserted with the date
"20.12.2010" which is not one of the supported date formats, as such it
was recognized as a string.
Since strings can not be translated to any other data types, then nothing
you apply from the format menu ("123" menu) changed the cells to be dates.

To fix the problem I changed all the strings in column A to spreadsheet
dates (you can see that all cells are now right aligned which means that
they were identified as a non string type).
You can now chart the annotated timeline like requested.

HTH
ChartMan


On Wed, Dec 22, 2010 at 2:00 PM, gigitek <[email protected]> wrote:

> I want to create a graph (AnnotatedTimeLine ) from this spreadsheet:
>
> https://spreadsheets.google.com/ccc?key=0AhgU7I4IfehhdHFaZGRlZzMxWFNXejhzdUN6dDhpQVE
>
> The problem is that the first column, A, containg the dates is
> retrieved as string not as date time, as AnnotatedTimeLine expects
> Firebug reports this: First column must contain date, or date and
> time.
> I formatted the column as date time using the 123 drop down menu.
>
> from the HTML source:
> function drawVisualization() {
>      // To see the data that this visualization uses, browse to
>      // http://spreadsheets.google.
> com/ccc?key=pCQbetd-CptGXxxQIG7VFIQ
>      var query = new google.visualization.Query(
>          'http://spreadsheets.google.com/tq?
> key=0AhgU7I4IfehhdHFaZGRlZzMxWFNXejhzdUN6dDhpQVE');
>
>      // Apply query language.
>      query.setQuery('SELECT A,B,C');
>
>      // 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 annotatedtimeline = new
>
> google.visualization.AnnotatedTimeLine(document.getElementById('visualization'));
>              annotatedtimeline.draw(data, {'displayAnnotations':
> true});
>    }
>
> Thank you
>
> --
> 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]<google-visualization-api%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-visualization-api?hl=en.
>
>

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