开发者

Configuring Google Annotated Timeline

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?


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)
                  }
           );
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜