简体   繁体   English

在 HighChart 中使用 getSVG() 打印 pdf 时如何去除文本阴影

[英]How to remove text shadow when print pdf using getSVG() in HighChart

I have a stacked column chart, using getSVG() to get svg string and pdfMake to print pdf, and the the result is that the texts on the column have some weird shadow.我有一个堆叠柱形图,使用 getSVG() 获取 svg 字符串并使用 pdfMake 打印 pdf,结果是柱上的文本有一些奇怪的阴影。 https://ibb.co/HrC62HP https://ibb.co/HrC62HP

I would like to know how to remove it,我想知道如何删除它,

This is the code to render the text, I'm using angular https://ibb.co/XktZV2v这是呈现文本的代码,我正在使用 angular https://ibb.co/XktZV2v

I've used replace method to change the stroke-width style to 0 in the svg string.我已经使用替换方法将 svg 字符串中的 stroke-width 样式更改为 0。 It didn't work没用

Please help.请帮忙。 Thank you.谢谢你。

This configuration removes all shadows from dataLabels, change in style.textOutline to false when you don't want default text outline.此配置从 dataLabels 中删除所有阴影,当您不想要默认文本轮廓时,将style.textOutline更改为 false。

  exporting: {
    chartOptions: {
      plotOptions: {
        series: {
          color: 'rgb(124, 181, 236)',
          dataLabels: {
            enabled: true,
            inside: true,
            format: '{y} min <br>',
            style: {
              width: '60%',
              textOverflow: 'elilipsis',
              fontSize: 10,
              color: 'rgb(0, 0, 255)',
              textOutline: false
            }
          }
        }
      }
    }
  }

Live demo: https://jsfiddle.net/BlackLabel/tcj4q8vz/现场演示: https://jsfiddle.net/BlackLabel/tcj4q8vz/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM