【发布时间】:2014-01-14 18:49:34
【问题描述】:
我有一个带有通过chart.renderer 添加的矩形的图形,它在 Firefox 中看起来完全符合我的要求,但是当我在 Chrome 或 IE 中查看它时,坐标已关闭。我有min 和max 设置,我试过setInterval,但无济于事。这是我的代码:
$('#ao_vs_ppv').highcharts({
chart: {
renderTo: 'ao_vs_ppv',
type: 'scatter',
height:600,
width:600
},
title: {
text: 'Air Overpressure Vs. Peak Particle Velocity'
},
xAxis: {
min: .01,
max: 10,
type: 'logarithmic',
minorTickInterval:0.1,
title: {
text: "Peak Particle Velocity (in/sec)"
},
labels: {
overflow: 'justify'
},
tickmarkPlacement: 'on',
gridLineWidth: 1,
plotBands: [{
color: '#F7FE2E',
from: .4,
to: 10
},{
color: '#F7FE2E',
from: 1,
to: 10
}]
},
yAxis: {
min: 90,
max: 150,
title: {
text: 'Air Overpressure (dBL)'
},
tickInterval:10,
labels: {
overflow: 'justify'
},
plotBands: [{
color: '#F7FE2E',
from: 120,
to: 150
}]
},
plotOptions: {
scatter: {
tooltip: {
headerFormat: '<b>{series.name}</b><br>',
pointFormat: 'AO: {point.y}dBL<br>PPV: {point.x}in/sec'
}
}
},
legend: {
layout: 'horizontal',
borderWidth: 1,
backgroundColor: '#FFFFFF',
shadow: true
},
series:formatHighChartsScatter(data[i]['x_data'],data[i]['y_data'], seismoNames)
}, function(chart) { // on complete
chart.renderer.rect(348, 50, 242, 217, 0)
.attr({
fill: 'red'
})
.add();
});
这是它在 Firefox 中的样子:http://i.imgur.com/8OQfRCR.png
这是它在 Chrome 中的样子:http://i.imgur.com/NpKjwu3.png
【问题讨论】:
-
ctrl + 0 被按下了吗?
-
@Rooster 不,它没有被按下。
-
同时按下它以清除缩放
标签: javascript jquery google-chrome firefox highcharts