问题描述:

I want to create some chart using Highstock.I want to know how Highstock determines dates?

in this example JSON look like this:

[1366934400000,417.20],

[1367193600000,430.12],

[1367280000000,442.78],

/* May 2013 */

[1367366400000,439.29],

[1367452800000,445.52],

[1367539200000,449.98],

[1367798400000,460.71],

[1367884800000,458.66],

[1367971200000,463.84],

[1368057600000,456.77],

[1368144000000,452.97]

How Highstock determines that 460.71 related to Monday May6 2013?

thanks

网友答案:

The first number in the x/y pair is the javascript date. It is in milliseconds since the POSIX time 0 (00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970).

In the data ([1367798400000,460.71]) the 1367798400000 is the number of milliseconds since POSIX 0.

相关阅读:
Top