user906568
user906568

Reputation: 471

Issue With Highcharts x-axis label

Hi I have the following jQuery code for a labelling the x-axis of a high charts spline chart which works amazingly:

xAxis: {
     type: 'datetime',
     maxZoom: 14 * 24 * 3600000, // fourteen days
     lineWidth: 1,
     lineColor: '#999999',
     title: {
        text: 'Date' 
     }
  }

The user supplies a from date and a to date and the x-axis labels are based on these values.

ISsue: When I the range between the from and to dates are less than 4, the labels turn into 'time' labels.. I just want dates... So I tried changing type: 'date' and the x-axis spews out a load of jargon (1313100M, 1313200M..)..

If the range is greater than 4, the graph's x-axis labels are fine..

Can anyone help?

Here is the link:

http://dev.speechlink.co.uk/David/fifthiteration/dbgrapher.php

Upvotes: 0

Views: 1889

Answers (1)

Igor Dymov
Igor Dymov

Reputation: 16460

Take a look at dateTimeLabelFormats parameter of xAxis object. It describes format of DateTime label on the axis.

Link: dateTimeLabelFormats

Try to change format of maybe day or hour to desired date format.

Upvotes: 1

Related Questions