我有以下代码使用 jqPLot 生成图表,我无法弄清楚为什么它没有正确显示 x 轴
jQuery(document).ready(function(){
$data = [['2012-03-03',1,'03 Mar 12'],['2012-03-06',4,'06 Mar 12'],['2012-03-07',1,'07 Mar 12'],['2012-03-08',1,'08 Mar 12'],['2012-03-15',2,'15 Mar 12'],['2012-03-18',1,'18 Mar 12'],['2012-03-21',3,'21 Mar 12'],];
jQuery.jqplot.config.enablePlugins = true;
jQuery.jsDate.config.defaultCentury = 2000;
jQuery.jqplot("chartdiv",[$data],
{
series:[{renderer:jQuery.jqplot.BarRenderer}],
seriesDefaults: {
showMarker:true,
pointLabels: { show:true },
rendererOptions: { barMargin:35}
},
axes :{
xaxis :{
renderer :jQuery.DateAxisRenderer,
min : '2012-03-01'
}
}
}
);
});