Change to a 24 hour format for datetime data in Google Charts
You need to format the datetimes using a DateFormatter.
// format dates
// ex: "August 5, 2013 1:45 PM" formatted as "05/08/2013 13:45"
var dateFormatter = new google.visualization.DateFormat({pattern: 'dd/MM/yyyy HH:mm'});
dateFormatter.format(data, 0);
You can format the axis labels by setting the hAxis.format
option:
var options = {
hAxis: {
format: 'dd/MM/yyyy HH:mm'
}
title: 'price'
};
The date formats support most of the ISO date formatting patterns.