导出高图到PDF结果在2页

Exporting Highchart To PDF Results in 2 Pages

本文关键字:结果 2页 PDF 高图      更新时间:2023-09-26

当我们以PDF格式导出图表时,我们得到的是PDF文件中看起来像2页的内容。这里是它的现场演示。我们不确定是什么原因造成的。

当我们导出时,我们正在改变图表属性,像这样:

chartMainLoc.exportChart(
    {
    type: 'application/pdf',
    sourceHeight: this.chartHeight,
    sourceWidth: this.chartWidth,
    scale: 1
    },
    {
    title: {
        text: '<span style="font-weight:bold">Labor Force, Employment and Unemployment for Pinellas County in June, 2013</span><br /><br /><span style="font-weight:bold;font-size:9pt">Labor Force Graph</span><br /><br /><span style="font-size:10px; font-weight:normal">The graph below shows the monthly not seasonally adjusted Labor Force, Employment and Unemployment data for Pinellas County in June, 2013.</span>'
    },
    subtitle: {
        text: 'Source: Labor Market Statistics, Local Area Unemployment Statistics Program and Online Advertised Job Data<br />Downloaded: 06/10/2014 4:20 PM'
    },
    legend: {
        y: -50
    },
    chart: {
        spacingLeft: 0,
        spacingBottom: 10,
        shadow: false,
        height: chartMainLoc.chartHeight + 20
    }
    }
)

这是一个已知的bug,报告在这里:https://github.com/hililide-software/highcharts.com/issues/1957