0

I have a working Google Annotated Timeline (see docs at http://code.google.com/apis/chart/interactive/docs/gallery/annotatedtimeline.html).

I would like to explicitly set a start_date and end_date, I presume by using zoomStartTime and zoomEndTime. But, I cannot get it to work and I think it's either because my syntax is wrong or because I'm using the wrong format for dates.

My last line of the function:

chart.draw(data, {'displayAnnotations': true}, {'zoomStartTime': new Date(2011, 6, 26)}, {'zoomEndTime': new Date(2011,6,30)});

How can I correct this?

sscirrus
  • 55,407
  • 41
  • 135
  • 228

1 Answers1

0

You should merge the options in a single hash:

chart.draw(data, {'displayAnnotations': true,
                  'zoomStartTime': new Date(2011, 6, 26),
                  'zoomEndTime': new Date(2011,6,30)
                  }
           );
apneadiving
  • 114,565
  • 26
  • 219
  • 213