繁体   English   中英

Highcharts js:如果3d系列图表中有一个大点,则会出错

[英]Highcharts js: get errors if there is a big point in a 3d series chart

如果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中,已在主分支上修复。

使用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/

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM