You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Highcharts导出PDF时样条曲线标记点消失问题求助

Highcharts导出PDF时样条曲线标记点消失问题
  • 导出PDF文件时标记点消失
  • 浏览器中可正常显示全部标记点

我使用Highcharts绘制了一张图表,将其导出为PDF时,样条曲线(spline)的标记点(dots)消失了,但在浏览器中显示正常。

以下是我的导出函数代码:

function toPDF() {
    var mode = 'specify';
    var pagebreak = (mode === 'specify') ?
        { mode: '', before: '.before', after: '.after', avoid: '.avoid' } :
        { mode: mode };

    var opt = {
        margin: 0,
        filename: 'myfile.pdf',
        watermark: undefined,
        autoResize: true,
        image: { type: "jpeg", quality: 0.98 },
        html2canvas: {
            dpi: 500,
            scale: 2,
            useCORS: true,
            pagebreak: pagebreak,
            allowTaint: true,
            scrollY: -window.scrollY,
            compressPDF: true
        },
        jsPDF: {
            unit: 'mm',
            format: 'a4',
            orientation: "l"
        },
    };

    $("h3").show();

    var PName = window.location.pathname;
    var fileN = opt.filename;

    if (PName.length > 0 && PName.substring(1, 4) == "RPT") {
        fileN = PName.split("/")[1].split(".")[0] + '_' + $("#txtdatepicker").val();
    }

    const element = document.getElementById("divContent");

    html2pdf().set(opt).from(element).save(fileN + '.pdf')
        .then(function () {
            $("h3").hide();
            toggleShow('show', 'BU1');
        })
        .catch(function (error) {
            $("h3").hide();
            toggleShow('show', 'BU1');
        });
}

我尝试添加相同的系列数据,并将类型从spline改为scatter,标记点可显示,但样式不是圆形。


内容的提问来源于stack exchange,提问作者Tuấn Đạt Vương

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.12 04:42:33