最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Highcharts: duplicate datalabel text on export - Stack Overflow

programmeradmin1浏览0评论

I've e across a weird glitch with Highcharts export (to PNG, SVG etc). Essentially, when exporting, the datalabels on the chart bee garbled, so that they duplicate like so:

I've tried changing the export image dimensions (even to match the original div size exactly) but I still have the same issue. The only thing I can think that might be affecting it is a custom formatter function (which shows the percentage after the total for each data point), but there's no manipulation of text size or anything. Any ideas?

I've e across a weird glitch with Highcharts export (to PNG, SVG etc). Essentially, when exporting, the datalabels on the chart bee garbled, so that they duplicate like so:

I've tried changing the export image dimensions (even to match the original div size exactly) but I still have the same issue. The only thing I can think that might be affecting it is a custom formatter function (which shows the percentage after the total for each data point), but there's no manipulation of text size or anything. Any ideas?

Share Improve this question asked Feb 24, 2015 at 16:09 user1548172user1548172 2
  • Provide an example that replicates the problem. – Halvor Holsten Strand Commented Feb 25, 2015 at 8:47
  • 1 This is bug in Highcharts reported here. – Paweł Fus Commented Feb 25, 2015 at 12:44
Add a ment  | 

2 Answers 2

Reset to default 9

This looks like a new problem in the export service.

I was able to work around it by disabling text shadows on the data labels. To do this, I added:

dataLabels: {
    style: {
        textShadow: ''
    }
}

This is what worked for me. I disabled the textShadow inside the series

series: [
        {
         name:'Serie1',
         data:[2027.15, 2027.15, 0.0], 
         dataLabels:{
                enabled: true, 
                style: {textShadow: 'none'
                }
        }
    ]
发布评论

评论列表(0)

  1. 暂无评论