0

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.

4

1 回答 1

2

这可能是一个时区问题
highcharts 默认情况下假设时间戳以 UTC 格式提供,
您可以尝试使用

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

这将使 highcharts 在您的浏览器时区中显示数据

于 2013-07-03T04:20:20.390 回答