我有一个基于Spring的webapp,我使用jqplot将json响应数据呈现到图形中。 在IE8中运行应用程序时遇到一些特定问题,注意 - 相同的实现在IE9中工作正常。 这些具体问题是 -
这些jqplot渲染器+ IE8是否存在一些已知问题。其他人在ie8遇到类似问题?任何解决方案 可能我在这里错过了一些重要的设置。
包含插件 -
"plugins/jquery.min.js",
"plugins/jquery.min.js",
"plugins/jquery.jqplot.min.js",
"plugins/jqplot.barRenderer.min.js",
"plugins/jqplot.categoryAxisRenderer.min.js",
"plugins/jqplot.pointLabels.min.js",
"plugins/jqplot.pieRenderer.min.js",
"plugins/jqplot.donutRenderer.min.js",
"plugins/jqplot.dateAxisRenderer.js",
"plugins/jqplot.canvasTextRenderer.js",
"plugins/jqplot.enhancedLegendRenderer.min.js",
"plugins/jqplot.highlighter.min.js",
"plugins/jqplot.canvasAxisTickRenderer.js",
"plugins/jqplot.dateAxisRenderer.js",
"css/jquery.jqplot.min.css",
"plugins/jquery_ui/ui/themes/smoothness/jquery-ui.css",
"jquery.jqplot.css"
使用的图形渲染器:bar,line,only only
我的impltn-
中设置的示例渲染器选项对象 r={
/*constant field - for the default theme based colors specified in the component's 'var' file*/
seriesColors: seriesColors,
seriesDefaults:{
/* r.seriesDefaults.renderer
* variable field - depending on the dashbard type and graph type asked for*/
renderer:$.jqplot.BarRenderer,
/* r.seriesDefaults.rendererOptions
* variable field - depending on the dashbard type and graph type asked for*/
rendererOptions: {
fillToZero: true,
barMargin : 50,
barWidth: 10,
barPadding: 5,
/* r.seriesDefaults.rendererOptions.smooth
* variable field - depending on the dashbard type and graph type asked for*/
smooth:true,
animation:{show:true}
},
showMarker:false,
pointLabels:{
show:true,//<<<<<<<<<< problem here - do not work in IE8
stackedValue: false //[true - for showing values above the stacked bars]
}
},
axes: {
xaxis: {
renderer: $.jqplot.CategoryAxisRenderer,
borderColor: "#ff1111",
borderWidth: 7,
rendererOptions:{
show: true
},
/* r.axes.xaxis.ticks
* variable field - depending on the dashbard type and graph type asked for*/
ticks: data_xAxis_ticks,
tickRenderer: $.jqplot.CanvasAxisTickRenderer,
tickOptions:{
angle:-30,
formatString:'%b-%#d\' %y'
}
},
yaxis: {
autoscale:true
}
},
series:{
renderer:$.jqplot.BarRenderer
//neighborThreshold: -10 //gives unnecessary gap when bars get stacked
},
legend: {
renderer: $.jqplot.EnhancedLegendRenderer,//<<<<<<<<<< problem here - do not work in IE8
show: true,
rendererOptions:{
numberColumns:2 //testing:works//<<<<<<<<<< problem here - do not work in IE8
},
labels:data_legend_labels,
formatString:'%b-%#d\' %y',fontSize:'10pt', fontFamily:'Tahoma'
//placement: 'outside'
},
grid: {
drawGridLines: true, // whether to draw lines across the grid or not.
gridLineColor: '#dddddd', // *Color of the grid lines.
background: '#ffffff', // CSS color spec for background color of grid.
drawBorder:false,
shadow: false
//borderColor: '#999999', // CSS color spec for border around grid.
//borderWidth: 2.0
},
highlighter: { //<<<<<<<<<< problem here - do not work in IE8
show: true,
showMarker:false,
tooltipContentEditor:function(str, seriesIndex, pointIndex, jqPlot) {
str.split(",");
var v=str.substr(2,str.length - 1);
return (r.legend.labels[seriesIndex]+"<br>"+v);
}
},
cursor: {
show: false
}
};