Image jqplot pointlabels在IE9和x2B中处于关闭位置;
在IE9+中,当使用jqplotToImageStr时,点标签似乎只占据图表的第四象限(好像整个图表都缩小了)。图表正常显示(当div用于标签时,我相信在页面内)通过添加css规则修复了它:Image jqplot pointlabels在IE9和x2B中处于关闭位置;,image,internet-explorer,save,jqplot,Image,Internet Explorer,Save,Jqplot,在IE9+中,当使用jqplotToImageStr时,点标签似乎只占据图表的第四象限(好像整个图表都缩小了)。图表正常显示(当div用于标签时,我相信在页面内)通过添加css规则修复了它: .jqplot-point-label { text-align: left; } 这是因为toimage函数有一个用于居中对齐文本(这是默认设置)的处理程序,这会导致定位错误 罪魁祸首: if ($(el).css('textAlign') === 'center') { templef
.jqplot-point-label {
text-align: left;
}
这是因为toimage函数有一个用于居中对齐文本(这是默认设置)的处理程序,这会导致定位错误
罪魁祸首:
if ($(el).css('textAlign') === 'center') {
templeft = left + (canvasWidth - context.measureText(w).width)/2 - transx;
}
在chrome中,textAlign属性实际上显示为-webkit center,因此被忽略