在IE7中遇到了一系列与运行JavaScript的兼容性问题有关的问题。我使用jqplot来生成数字,这在Chrome和IE8中效果很好,但在IE7中无法使用。jqplot在IE7中无法正常工作
为了诊断,我只运行最简单的代码$.jqplot('chart1', s1)
,它在IE7中工作。所以我认为问题是关于所有选项(除了传说)。任何人都可以给我一些建议吗? IE7只接受某种类型的语法吗?
CODE和Demo:
<div id="chart1" style="margin-top:20px; margin-left:20px; width:650px; height:400px;"></div>
<!--[if lt IE 9]>
<script src="http://www.prioritymarketers.com/jqplot/src/excanvas.min.js"></script>
<![endif]-->
<script>
$.jqplot.config.enablePlugins = true;
var ms= 2
var s1 =[[5.0, 23.0, 131.0, 779.0, 4667.0, 27995.0, 167963.0, 1007771.0, 6046619.0, 36279707.0], [13.0, 85.0, 517.0, 3109.0, 18661.0, 111973.0, 671845.0, 4031077.0, 24186469.0, 145118821.0]]
L = [{label: 'Stage 1'}];
var i = 2
while (i <= ms) {
L.push({label: 'Stage' + i});
i++;
}
$.jqplot('chart1', s1, {
seriesDefaults: {
showMarker: false,
pointLabels: {
show: false
},
},
series: L,
axes: {
xaxis: {
label: 'Time units',
pad: 0,
},
yaxis: {
label: 'Number of individuals',
labelRenderer: $.jqplot.CanvasAxisLabelRenderer,
pad: 0
}
},
legend: {
show: true,
location: 'nw',
placement: 'inside',
fontSize: '11px'
}
})
</script>
一个打开一个你的选择,直到它打破了:P – jbabey
互联网不在IE7中工作得很好... – Timm
@jbabey:测试过。只有传说选项适用... –