Handling unix timestamp with highcharts

2019-02-12 09:58发布

jsfiddle: http://jsfiddle.net/RjPRd/

Times & Labels are displayed incorrectly.

I think the timestamp should be multiplied by 1000 for Javascript Time but what's the best approach? Also I believe the setup is still incorrect because the labels seem opposite to where the cursor is.

1条回答
老娘就宠你
2楼-- · 2019-02-12 11:01

You are right, timestamps in Javascript are milliseconds so you should multiply everything by 1000.

For the other problem it comes from the fact that your data is ordered backwards. Apparently HighCharts is messing up when the series are not properly ordered.

Here's the correction for your code: http://jsfiddle.net/cvedovini/RjPRd/2/

查看更多
登录 后发表回答