Highcharts: x-value as date

后端 未结 2 1454
没有蜡笔的小新
没有蜡笔的小新 2021-01-24 14:48

I have a list of arrays as [x,y] for Highcharts. My x-values are timestamps in the format 2013-04-30 00:04:00.

Here\'s an example of the Highchart options:

2条回答
  •  囚心锁ツ
    2021-01-24 15:17

    yes you can go with UNIX timestamp I mean the timestamp in milliseconds. highcharts accept them as direct integer input for date-time type of x-Axis.

    ex: 30/04/2013 00:00:00:000 = 1367260200000

    you can pass this value like

    data: [[1367260200000, 30],[1367260260000, 32], ....]
    

    Hope this will be of your use.

提交回复
热议问题