no... the extra set in the date in intentional, Date is (year, month, day, hour) or (year, month, day, hour, minute) or (year, month, day, hour, minute, second)
so, i really meant what i wrote, and i really meant to use this vis' to display an event that happned between specific hours and the control does not really know hoe to behave... it can only zoom in a "1d, 5d, 1m, 6m..." as you know, this is not the only case when using a generic control to display something that happned along time, not evrything is compared to a stock... help appreciated (i mean, hope that someone fixes this or it is better to write a java applet that does it). thanks DanBo wrote: > Remove the extra set of ", 1" from the date values. > > You have: > data.setValue(0, 0, new Date(2008, 1 , 1, 1)); > > You need: > data.setValue(0, 0, new Date(2008, 1 , 1)); > > http://documents.google.com/support/spreadsheets/bin/answer.py?answer=82712 > > DATE(year, month, day) > > Hope that helps. > > On Nov 9, 9:19�am, logelog <[EMAIL PROTECTED]> wrote: > > hi, > > i'm modifying the sample code for this vis' and find it somewhat > > unstable: > > 1) zooming gets funky after playing with the controls (left or right) > > 2) the control is very irresponsive and CPU tends to be high even with > > few points > > 3) displayExactValues manipulation does not work - i'm not sure if i > > use Javascript correctly (please advise). > > > > i'm mainly interested to use this vis' to show what happned between > > exact hours of the day and i cannot make the zoom work fine or break > > out of the "1d, 5d, 1m, 6m..." > > > > appreciate your comments. > > > > the code: > > > > <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('date', 'Date'); > > � � � � � � data.addColumn('number', 'pilot A'); > > � � � � � � data.addColumn('number', 'pilot B'); > > � � � � � � data.addRows(6); > > � � � � � � data.setValue(0, 0, new Date(2008, 1 , 1, 1)); > > � � � � � � data.setValue(0, 1, 3000); > > � � � � � � data.setValue(0, 2, 4045); > > � � � � � � data.setValue(1, 0, new Date(2008, 1 , 1, 2)); > > � � � � � � data.setValue(1, 1, 1404); > > � � � � � � data.setValue(1, 2, 2037); > > � � � � � � data.setValue(2, 0, new Date(2008, 1 , 1, 3)); > > � � � � � � data.setValue(2, 1, 5502); > > � � � � � � data.setValue(2, 2, 5076); > > � � � � � � data.setValue(3, 0, new Date(2008, 1 , 1, 4)); > > � � � � � � data.setValue(3, 1, 7528); > > � � � � � � data.setValue(3, 2, 1433); > > � � � � � � data.setValue(4, 0, new Date(2008, 1 , 1, 5)); > > � � � � � � data.setValue(4, 1, 4147); > > � � � � � � data.setValue(4, 2, 6646); > > � � � � � � data.setValue(5, 0, new Date(2008, 1 , 1, 6)); > > � � � � � � data.setValue(5, 1, 3332); > > � � � � � � data.setValue(5, 2, 3946); > > � � � � � � var chart = new > > google.visualization.AnnotatedTimeLine(document.getElementById('chart_div')�); > > � � � � � � chart.draw(data, {displayAnnotations: true , > > displayExactValues: > > true}); > > � � � � � } > > > > � � </script> > > � � </head> > > � � <body> > > � � � � <div id="chart_div" style="width: 700px; height: 240px;"></ > > div> > > � � </body> > > </html> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
