wkhtmltopdf无法加载highcharts.js

时间:2019-04-03 20:07:43

标签: highcharts wkhtmltopdf

我正在使用wkhtmltopdf将图表转换为pdf,但是wkhtmltopdf给我一个错误,而jquery可以很好地加载https://code.highcharts.com/highcharts.js。任何帮助表示赞赏!

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript" src="https://code.highcharts.com/highcharts.js"></script>
<script>
    $(document).ready(function() {
        document.getElementById("test").innerHTML = "Before highcharts";

        Highcharts.chart('container', {

            chart: {
                animation: false
            },

            plotOptions: {
                series: {
                    animation: false
                }
            },

            series: [{
                data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
            }],

        });
        document.getElementById("test").innerHTML = "After highcharts";
    });
</script>

PDF结果 enter image description here

0 个答案:

没有答案