Mohamad Zein
Mohamad Zein

Reputation: 777

Highcharts tickinterval set to one minute shows only one date

I have a highcharts graph of speed(y axis) and time( x axis), each second posts a new speed, which means in an hour I will have 3600 data point, and that is a lot. I found out about tickInterval and the ability to shorten the amount of time drawn on the x axes, but as soon as I set it the ticks labels disappear and it shows only the first minute label

Here are two graph comparison of how it look like with tickInterval and without

without tickInterval:

enter image description here

With tickInterval:

I would have expected to see a tick label on x axis every minute but instead I see only this ? hmm ?

enter image description here

here is my code with less data points than I have:

http://jsfiddle.net/cyc89zop/1/

How can I fix this problem ?

Upvotes: 2

Views: 1940

Answers (1)

jlbriggs
jlbriggs

Reputation: 17791

2 things:

1) You have specified your axis type as "Time" which is not a valid option. What you want is datetime.

2) You have then specified categories for the x axis. categories and datetime axis types are mutually exclusive - you must use only one or the other, not both.

To get the proper dates with a datetime axis type, you specify either

1) an x value for each data point,in millisecond epoch time, or

2) a pointStart and pointInterval property for the series

Upvotes: 3

Related Questions