Just an update to say that the specific Javascript 'component not
available' error was my fault. It was because I was running the script
from a local file. That error goes away after deployment to a web
server. However, the strange plotting behaviour remains.

Thanks

Eric





On Sep 17, 6:08 pm, Eric Saunders <[EMAIL PROTECTED]> wrote:
> Hi all
>
> I've got a simple annotated timeline, which changes on the order of
> minutes. These changes don't seem to be displaying in the timeline.
> I've seen elsewhere on the group that people are successfully doing
> millisecond plots with this visualisation. Am I doing something very
> stupid? I'm expecting the output to look roughly like this:
>
> ___
>       |              ___________
>       |________|
> 2hrs      3hrs       3hrs
>
> But what I get is more like this:
>
> ____
>        \
>         \__________
> 2     3        3
>
> I also get the javascript error 'Component is not available'. This is
> running in Firefox 2 under Firebug.
>
> Here is the minimal code that exhibits this behaviour for me:
>
> <html>
>   <head>
>     <script type="text/javascript" src="http://www.google.com/jsapi";></
> script>
>     <script type="text/javascript">
>
>       google.load("visualization", "1", {packages:
> ["annotatedtimeline"]});
>       google.setOnLoadCallback(drawChart);
>       function drawChart() {
>         var data = new google.visualization.DataTable();
>         data.addColumn('datetime', 'Date');
>         data.addColumn('number', 'State');
>         data.addRows(6);
>
>         data.setValue(0, 0, new Date(2008, 1 ,1, 20, 0));
>         data.setValue(0, 1, 5);
>
>         data.setValue(1, 0, new Date(2008, 1 ,1, 22, 0));
>         data.setValue(1, 1, 5);
>
>         data.setValue(2, 0, new Date(2008, 1 ,1, 22, 1));
>         data.setValue(2, 1, 2);
>
>         data.setValue(2, 0, new Date(2008, 1 ,2, 1, 0));
>         data.setValue(2, 1, 2);
>
>         data.setValue(3, 0, new Date(2008, 1 ,2, 1, 1));
>         data.setValue(3, 1, 4);
>
>         data.setValue(2, 0, new Date(2008, 1 ,2, 4, 0));
>         data.setValue(2, 1, 4);
>
>         var chart = new
> google.visualization.AnnotatedTimeLine(document.getElementById('chart_div'));
>         chart.draw(data, {displayAnnotations: false});
>       }
>     </script>
>   </head>
>
>   <body>
>     <div id="chart_div" style="width: 700px; height: 240px;"></div>
>   </body>
> </html>
>
> Any ideas would be greatly appreciated!
>
> Thanks
>
> Eric

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