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
相关产品推荐
相关产品推荐

