Odyss3us
Odyss3us

Reputation: 6635

Highcharts: X-axis off by 2 hours

I am trying to display a dataset that spans 60 minutes, but for some reason the x-axis is constantly off by 2 hours. I am passing through an array of objects, each containing the unix timestamp and a value, [{ x:1372795260, y:1 } , {...}, {etc...}].

What could be causing this, and how can I get it to display the correct time?

I've set up a fiddle.

Upvotes: 0

Views: 524

Answers (1)

austin
austin

Reputation: 1171

this might be a time zone issue
highcharts by default assumes timestamps are supplied in UTC
you may try to using

    Highcharts.setOptions({
    global: {
        useUTC: false
    }
});

this would make highcharts display data in your browsers timezone

Upvotes: 2

Related Questions