javascript - Multiline Highchart based on Dates -


i want create multiline highchart takes 24hrs in x axis , each date plot 1 line.

[{         "date": "2017-05-01t02:50:26",         "value": 764.88     },     {         "date": "2017-05-02t12:29:07",         "value": 978.66     },     {         "date": "2017-05-04t08:30:20",         "value": 522.61     },     {         "date": "2017-05-04t12:29:34",         "value": 762.7     },     {         "date": "2017-05-02t11:09:56",         "value": 809.96     },     {         "date": "2017-05-03t03:32:35",         "value": 736.94     },     {         "date": "2017-05-04t12:56:53",         "value": 339.68     } ] 

here have 4 unique dates i.e

2017-05-01 , 2017-05-02 , 2017-05-03 , 2017-05-04

and want 4 lines of each date. x axis has hour:minute , y axis value. created fiddle.

to change way xaxis labels display, can use highcharts.dateformat() function inside xaxis.labels.formatter. take @ example posted below.

api reference:
http://api.highcharts.com/highcharts/xaxis.labels.formatter
http://api.highcharts.com/highcharts/highcharts.dateformat

example:
http://jsfiddle.net/x41vev1p/


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -