Reputation: 51
i'm using Highstock charts with php but i have a strange problem which happens in my chart, X axis is one month forward ! my data is something like this
...
[Date.UTC(2016,01,11,17,21),24],
[Date.UTC(2016,01,11,17,51),24.1],
[Date.UTC(2016,01,11,18,21),24.1],
[Date.UTC(2016,01,11,18,51),24.4],]
but on the chart .. the month is "Feb" instead of Jan ! is there any sitting to do for that ?
Upvotes: 0
Views: 33
Reputation: 37578
According to Date.UTC documentation, months are indexed from 0 not 1.
Date.UTC(year, month[, day[, hour[, minute[, second[, millisecond]]]]])
month
An integer between 0 and 11 representing the month.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC
Upvotes: 1