我尝试使用 jqplot 绘制图形。所以我修改了这个例子以获得基于日期的图表。
目前我的代码是这样的:
var plot1 = $.jqplot('chartdiv', [[["2010-12-25.14:19:47",1],
["2010-11-25.14:19:47",2],
["2010-10-25.14:19:47",3]]], {
title: 'mytitle',
series: [{
label: 'my label',
neighborThreshold: -1
}],
axes: {
xaxis: {
renderer: $.jqplot.DateAxisRenderer,
// min:'August 1, 2010 16:00:00',
tickInterval: '1 months',
tickOptions:{formatString:'%Y-%m-%d.%H:%M:%S'}
},
yaxis: {
tickOptions:{formatString:'$%.2f'}
}
},
cursor:{
show: true,
zoom:true,
showTooltip:false
}
});
但我收到以下错误:
this.proxy.getTime is not a function
(function(w){var l;w.fn.emptyForce=fun...))?([nAscboxXuidfegpEGP])/g})(jQuery);
看起来,脚本通过解析日期格式存在问题。但为什么?
谢谢你,任何帮助。
//更新.. ups,我在写完这篇文章后很快就找到了原因(经过1天的尝试和错误“;-))所以我找到的原因产生了一个新问题:是否有任何jqplot选项,定义如何解析输入日期格式?