我在我的jsp页面中使用jqplot..成功集成了条形图,折线图等。现在当我在chrome中看到这个图表时,我遇到了这个问题,在mozila中,同样的图表显示完美的y和x轴标签对齐,但是当我在 chrome 中看到相同的图表时,y 轴和 x 轴对齐和填充看起来非常奇怪且非常合理......让我给你这个片段
Mozilla浏览器显示是这样的
那么为什么轴标签在这个 chrome 浏览器中看起来如此笨拙并且非常接近轴线?
所以任何人都可以指导我如何消除 chrome 和 mozila 浏览器中的这种差异,以及如何通过正确对齐轴使该图表至少看起来不错
这是我尝试过的代码
$(document).ready(function(){
var line2 = [['1/1/2008', 3.03], ['2/14/2008', 2.30], ['3/7/2008', 3.12], ['4/22/2008', 1.25]];
var plot1 = $.jqplot('chart7', [line2], { animate: !$.jqplot.use_excanvas,
axes:{
xaxis:{
renderer:$.jqplot.DateAxisRenderer,
tickOptions:{
pad:2.5,
left:10,
formatString:'%b ',
angle: - 40,
fontSize: '7pt'
}
},
yaxis:{
pad:2.5,
tickOptions:{
formatString:'%.2f'
}
}
},
highlighter: {
show: true,
sizeAdjust: 1.5
},
cursor: {
style: 'default',
show: true,
followMouse: true,
},grid: {background: 'white'}
});
});