Home Forums Chart Support Need 24 hour time slot along x-axis Reply To: Need 24 hour time slot along x-axis

#23929

@gurpreet2501,

In the code snippet shared above, you’re using label to display date and time value. Instead, you need to assign the Date Object to x-values and set the axisX valueFormatString as valueFormatString: "HH:mm" for displaying time in 24-hour format(using “hh” will display time in 12-hour format).

Also, please take a look at this JSFiddle for a working example with sample code.

chart with date time values in 24 hour format

__
Shashi Ranjan
Team CanvasJS