user1293029
user1293029

Reputation:

Add data for Annotated time line of Google Chart with time

How to add data for Annotated timeline of Google Chart with time? such as:

[new Date(2008, 1 ,1), Time(12.2.30), 30000, undefined, undefined, 40645, undefined, undefined],

There is no demo on official site, is it possible?

Upvotes: 0

Views: 230

Answers (1)

asgallant
asgallant

Reputation: 26340

Javascript Date object support specifying hours, minutes, seconds, and milliseconds:

new Date(year, month, day, hours, minutes, seconds, milliseconds);

so if you want to specify a time of day in the date, you just need to add the appropriate parameters. In your example, it would be:

new Date(2008, 1, 1, 12, 2, 30) // 12:02:30 February 1, 2008

Upvotes: 2

Related Questions