You can get time to be included if you set the first column to a
'datetime' type.

There doesn't appear to be a way to force a specific range for the x-
axis.  You can use the setVisibleChartRange(start,end) method if you
want to set an initial zoom, but I couldn't find a way to force a 24
hour window if you don't have 24 hours worth of data points.

Modified the playground code to the following...

  var data = new google.visualization.DataTable();
  data.addColumn('datetime', 'Date');
  data.addColumn('number', 'Sold Pencils');
  data.addColumn('string', 'title1');
  data.addColumn('string', 'text1');
  data.addColumn('number', 'Sold Pens');
  data.addColumn('string', 'title2');
  data.addColumn('string', 'text2');
  data.addRows(3);
  data.setValue(0, 0, new Date(2008, 1 ,1, 1, 30, 0));
  data.setValue(0, 1, 30000);
  data.setValue(0, 4, 40645);
  data.setValue(1, 0, new Date(2008, 1 ,1, 3, 30, 0));
  data.setValue(1, 1, 14045);
  data.setValue(1, 4, 20374);
  data.setValue(2, 0, new Date(2008, 1 ,1, 5, 30, 0));
  data.setValue(2, 1, 55022);
  data.setValue(2, 4, 50766);

  var annotatedtimeline = new google.visualization.AnnotatedTimeLine(
      document.getElementById('visualization'));
  annotatedtimeline.draw(data, {'displayAnnotations': true});
  //Uncomment to set an initial zoom to just the second data point
  //annotatedtimeline.setVisibleChartRange(new Date(2008, 1 ,1, 2, 30,
0), new Date(2008, 1 ,1, 4, 0, 0) );

On Feb 20, 7:21 am, Filip Glazar <[email protected]> wrote:
> Hi, I have problem with this amazing chart. I know how to add date,
> but how can I add time? I need to show stats for one day but in
> different time. Simply I need range 00:00:00 to 24:00:00 on x axis.
> Thank you for yours replies.

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