Use CategoryAxisRenderer
, it will solve your problem and then you dont have to supply min
and max
.
var line1 = [['2014-01-15 15:10:01', 21],
['2014-01-15 15:10:12', 21],
['2014-01-15 15:10:12', 22],
['2014-01-15 15:10:14', 22],
['2014-01-15 15:10:14', 21],
['2014-01-15 15:10:17', 21],
['2014-01-15 15:10:17', 22],
['2014-01-15 15:10:23', 22],
['2014-01-15 15:10:23', 18],
['2014-01-15 15:10:28', 18]];
var plot1 = $.jqplot('chart1', [line1], {
title: 'Default Date Axis',
axes: { xaxis: { renderer: $.jqplot.CategoryAxisRenderer } },
series: [{ lineWidth: 1, markerOptions: { style: 'square' } }]
});