Reputation: 12391
What kind of format has the date been converted to in https://www.highcharts.com/stock/demo/line-markers?
I am generating data but I need to convert the data into this format, strtotime
doesn't seem to do the trick.
Upvotes: 0
Views: 39
Reputation: 4114
You just need to multiply by 1000 the PHP timestamp to have a javascript timestamp
var jsTimestamp = 1545055048 * 1000
Upvotes: 1
Reputation: 7372
Highcharts documentation:
For datetime axes, the X value is the timestamp in milliseconds since 1970.
datetime
axes data format:
[
x value, - timestamp in milliseconds since 1970
y value
]
Upvotes: 1