开发者

Configuring Google Annotated Timeline

开发者 https://www.devze.com 2023-03-15 23:06 出处:网络
I have a working Google Annotated Timeline (see docs at http://code.google.com/apis/chart/interactive/docs/gallery/annotatedtimeline.html开发者_开发知识库).

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

精彩评论

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