导出图形到svg时出错,网络错误?

问题描述 投票:0回答:1

将 Highcharts 版本更新到 11.3.0,我的狗是当导出使用 avg 图形时,出现网络问题,我已经在不同的机器上尝试过,也是同样的错误image

代码:

Highcharts.chart('container', {
    chart: {
        type: 'column'
    },
    title: {
        text: 'Corn vs wheat estimated production for 2020',
        align: 'left'
    },
    subtitle: {
        text:
            'Source: <a target="_blank" ' +
            'href="https://www.indexmundi.com/agriculture/?commodity=corn">indexmundi</a>',
        align: 'left'
    },
    xAxis: {
        categories: ['USA', 'China', 'Brazil', 'EU', 'India', 'Russia'],
        crosshair: true,
        accessibility: {
            description: 'Countries'
        }
    },
    yAxis: {
        min: 0,
        title: {
            text: '1000 metric tons (MT)'
        }
    },
    tooltip: {
        valueSuffix: ' (1000 MT)'
    },
    plotOptions: {
        column: {
            pointPadding: 0.2,
            borderWidth: 0
        }
    },
    exporting: {
        filename: 'graficas2'
    },
    series: [
        {
            name: 'Corn',
            data: [406292, 260000, 107000, 68300, 27500, 14500]
        },
        {
            name: 'Wheat',
            data: [51086, 136000, 5500, 141000, 107180, 77000]
        }
    ]
});

我想知道这是我的错误还是图表错误

highcharts
1个回答
0
投票

导出模块 v11.3 存在问题,报告如下:https://github.com/highcharts/highcharts/issues/20376您可以在 github 线程中添加您的评论和示例。

作为解决方法,您可以使用 Highcharts v11.2:

<script src="https://code.highcharts.com/11.2/highcharts.js"></script>
<script src="https://code.highcharts.com/11.2/modules/exporting.js"></script>

现场演示:https://jsfiddle.net/BlackLabel/nmgyfkjb/

© www.soinside.com 2019 - 2024. All rights reserved.