gpt4 book ai didi

javascript - highcharts 缩放折线图无法正常工作

转载 作者:行者123 更新时间:2023-12-02 14:48:02 26 4
gpt4 key购买 nike

看下面的 fiddle : 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 - highcharts 缩放折线图无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36430415/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com