看下面的小提琴:
http://jsfiddle.net/fmarino/q9c31a1g/3/
$(function () {
$('#container').highcharts({
chart: {
zoomType: 'x'
},
credits: {
enabled: false
}, title: {
text: 'Production per orbit'
},
xAxis: {
crosshair: true,
title: {
text: 'Orbits'
} },
yAxis: {
min: 0,
title: {
text: 'Volume'
}
},
legend: {
align: 'right',
x: -30,
verticalAlign: 'top',
y: 25,
floating: true,
backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || 'white',
borderColor: '#CCC',
borderWidth: 1,
shadow: false }, tooltip: {
headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
'<td style="padding:0"><b>{point.y}</b></td></tr>',
footerFormat: '</table>',
shared: true,
useHTML: true
},
plotOptions: {
bar: {
dataLabels: {
enabled: true
}
},
column: {
dataLabels: {
enabled: true
},
pointPadding: 0.2,
borderWidth: 0
}
},
exporting: {
sourceWidth: 1400,
sourceHeight: 400,
// scale: 2 (default)
chartOptions: {
subtitle: null
}
}, series: [ {
name: 'Total Size',
data: [...]
});
});
然后尝试放大左侧的部分。对我来说(firefox)仅显示缩放后的l2大小。
难道我做错了什么?
在此类图表上实施缩放的正确方法是什么?
谢谢
最佳答案
正如Halvor建议的那样,我的数据未排序。实际上,它的顺序相反,缺少一点。
以升序模式对数据进行排序解决了该问题。
谢谢。
关于javascript - 高线图放大折线图无法正常工作,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/36430415/