首页 > 解决方案 > 使用 allowHTML 和 useHTMl 导出 highchart 时出错

问题描述

我已经在 Highchart 中设置useHTML并设置allowHTML为 true。在视图中,html 已正确呈现,但在使用exportChartLocal()highchart 导出图表时会引发错误:'Image type not supported for charts with embedded HTML'。可能是什么原因导致在出口中也有其他方法可以实现相同的目标?代码片段如下:

this.chart.exportChartLocal({
type:'application/pdf',
filname: 'chart'
})

subtitle:{
useHTML: true,
text: 'part1   -   xyz
  <br> p2 &nbsp;&nbsp;&nbsp;&nbsp; - &nbsp; zzz
<br> pp3 &nbsp;&nbsp;&nbsp; - &nbsp; dd',
style:{ fontSize:10px}
}

exporting{
enabled: false,
allowHTML: true,
fallbackToExportServer: false,
error: (options,err){
console.log(err)
}
}

标签: javascripthtmlangularhighchartsangular5

解决方案


推荐阅读