饼图与导出PDF高图无法正常工作

时间:2015-12-19 19:20:08

标签: jquery highcharts pdf-generation

当我使用此饼图导出PDF时,它有时会工作,有时则不会。它就像下面的图像。

enter image description here

这是生成饼图的代码。 obj数据很好。

    $(".curve_chart").each(function () {
        var dataXAxis = [];
        var length = 0;
        length = obj.length;
        for (var i = 0; i < length; i++) {
            dataXAxis.push({name: obj[i].label, y: obj[i].y});
        }
        $('#curve_chart_' + que_id).highcharts({
            chart: {
                renderTo: 'container',
                plotBackgroundColor: null,
                plotBorderWidth: null,
                plotShadow: false,
                type: 'pie'
            },
            title: {
                text: que_txt,
            },
            tooltip: {
                pointFormat: '{point.name}: <b>{point.y}</b>'
            },
            plotOptions: {
                pie: {
                    allowPointSelect: true,
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        format: '<b>{point.name}</b>: {point.y} ',
                    }
                }
            },
            series: [{
                    name: "names",
                    colorByPoint: true,
                    data: dataXAxis
                }]
        });
    });
});

请帮助我。

提前谢谢。

0 个答案:

没有答案
相关问题