Piyush Dhamecha
Piyush Dhamecha

Reputation: 1515

Highstock chart - issue with xaxis label

I have some data with last date of each month.

for e.g.

[1504137600000, 52.2]
[1501459200000, 52.1]
[1498780800000, 52.4]
[1496188800000, 53.1]
[1493510400000, 52.7]
[1490918400000, 52.4]
[1488240000000, 53.3]

When i plot the chart using this data. xAxis label not showing properly.

enter image description here

its showing xAxis Label, Feb '08 as starting label, I want to start with Jan '08 from first label.

jsfiddle: http://jsfiddle.net/xtgj4y0d/1/

Upvotes: 0

Views: 185

Answers (1)

pawel_d
pawel_d

Reputation: 3070

To specify labels for exact timestamps, you can use tickPositions array. You also need to use Highcharts.dateFormat function to format dates.

API Reference:
http://api.highcharts.com/highcharts/xAxis.tickPositions
http://api.highcharts.com/highcharts/Highcharts.dateFormat

Example:
http://jsfiddle.net/wL7o3zd3/

Upvotes: 2

Related Questions