I am using Flot to draw total count per day per hour.
The data comes from database in a array as follows:
[2016-12-24 00] => 191
[2016-12-24 01] => 126
[2016-12-24 02] => 85
[2016-12-24 03] => 79
[2016-12-24 04] => 67
[2016-12-24 05] => 69
[2016-12-24 06] => 69
[2016-12-24 07] => 113
[2016-12-24 08] => 171
[2016-12-24 09] => 196
[2016-12-24 10] => 259
[2016-12-24 11] => 64
[2016-12-24 12] => 0
[2016-12-24 13] => 0
[2016-12-24 14] => 0
[2016-12-24 15] => 0
[2016-12-24 16] => 0
[2016-12-24 17] => 0
[2016-12-24 18] => 0
[2016-12-24 19] => 0
[2016-12-24 20] => 0
[2016-12-24 21] => 0
[2016-12-24 22] => 0
[2016-12-24 23] => 0
Then it is formated in unix time so that I got below data for the flot.
[1482537600, 191],[1482541200, 126],[1482544800, 85],[1482548400, 79],[1482552000, 67],[1482555600, 69],[1482559200, 69],[1482562800, 113],[1482566400, 171],[1482570000, 196],[1482537600, 259],[1482541200, 64],[1482544800, 0],[1482548400, 0],[1482552000, 0],[1482555600, 0],[1482559200, 0],[1482562800, 0],[1482566400, 0],[1482570000, 0],[1482537600, 0],[1482541200, 0],[1482544800, 0],[1482548400, 0]
The issue I have is that the chart is not displaying the the time axis correctly.
This is how it is displayed.
The code I have is:
xaxis:{
mode: 'time',
timeformat: '%h %p',
mintickSize: [1, "hours"]
}
What is wrong in the above code?