I'm trying use epoch time dates in my series data. The array looks like this:
data:[ [1324857600,205.4],[1324771200,208.7],[1324684800,205.4]. . .]
The points display fine, but the date labels on the x-axis and tooltip are all set to 16 Jan 1970 (the beginning of epoch time!).
If I do a bunch of string-fu I can produce an array that looks like this:
data:[ [Date.UTC(2011, 11, 26),247.7],[Date.UTC(2011, 11, 25),245.5] . . .]
When I do it this way the date labels on the x-axis are correct.
I've tried using the dateTimeLabelFormat option and it formats the date correctly - it's just that when I try to use millisecond values all I get is 16 Jan 70.
Any ideas? I'd rather work with milliseconds than jump through all the hoops to produce "Date.UTC(2011, 11, 26)."
Thanks!
Found the answer on the Highsoft forum.
I need to multiply the epoch time values by 1000 to get the proper millisecond values for Highcharts.
Works great!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With