jMoore
jMoore

Reputation: 53

Display Month and Date in highcharts when hour is 00:00

Currently, my graph looks as below.
enter image description here

I am trying to change it to Sep 7, if the hour is 24 hours or 00:00.

I tried different formats like

format:'{value:%H:%M}',

or format:'{value:%H:%M %e %b}',

But not getting the desired result. Could you suggest me what format I should use to make it work?

Upvotes: 0

Views: 82

Answers (1)

jMoore
jMoore

Reputation: 53

I was able to resolve this by using the following format.

xAxis: {
  type: 'datetime',
  opposite: true,
  tickPosition: 'inside',
  crosshair,
  labels: {      
    y: -8,
  },
  dateTimeLabelFormats : {
    day: '%b. %e',
    hour: '%H:%M',
}
},

Now new graph looks like as below. enter image description here

Upvotes: 3

Related Questions