gpt4 book ai didi

javascript - Highcharts js : get errors if there is a big point in a 3d series chart

转载 作者:行者123 更新时间:2023-11-28 05:17:17 25 4
gpt4 key购买 nike

如果 3d 系列图表中有一个大点,我会收到错误。

以下代码是来自 highcharts 文档的示例。

http://jsfiddle.net/highcharts/4dccq/?utm_source=website&utm_medium=embed&utm_campaign=4dccq

如果我在上面的代码中将数据数组中的最后一个值更改为 999,我会在 Chrome v54 和 IE 11 的控制台中收到错误。但 Firefox 不会提示。

修改后的代码: http://jsfiddle.net/4dccq/718/

Chrome 报告:错误:属性 d:属性意外结束。预期数量“M”。

IE 报告:SVG4601:SVG 路径数据格式不正确,无法完全解析。

谢谢。

$(function () {
$('#container').highcharts({
chart: {
type: 'column',
margin: 75,
options3d: {
enabled: true,
alpha: 15,
beta: 15,
depth: 110
}
},
plotOptions: {
column: {
depth: 40,
stacking: true,
grouping: false,
groupZPadding: 10
}
},
series: [{
data: [1, 2, 4, 3, 2, 4],
stack: 0
}, {
data: [5, 6, 3, 4, 1, 2],
stack: 0
}, {
data: [7, 9, 8, 7, 5, 999],
// ****** I changed the last value form 8 to 999, and then got the error
stack: 1
}]
});
});

最佳答案

这是一个回归错误。它出现在 Highcharts 5.0.5 中,已经在 master 分支上修复。

使用5.0.4版本

<script src="http://code.highcharts.com/5.0.4/highcharts.js"></script>
<script src="http://code.highcharts.com/5.0.4/highcharts-3d.js"></script>

http://jsfiddle.net/4dccq/719/

或 github 版本:

<script src="http://github.highcharts.com/highcharts.js"></script>
<script src="http://github.highcharts.com/highcharts-3d.js"></script>

http://jsfiddle.net/4dccq/720/

关于javascript - Highcharts js : get errors if there is a big point in a 3d series chart,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40875838/

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