Stefano Castriotta
Stefano Castriotta

Reputation: 2913

Highcharts Pie chart export, labels are rendered twice

I'm having an issue exporting a Pie chart with highcharts.js and integrated exporting module. Labels are rendered twice in the exported image (tried png,jpeg and pdf, only the svg image works fine). I already tried to change the font size of labels:

dataLabels: {
    enabled: true,
    color: 'black',
    style: { fontSize: '8px' },
    formatter: function () {
        return this.key + '<br> ' + Math.round(this.percentage * 10) / 10 + '%';
    }
},

but it has no effects in the exported image.

This is the correct chart rendered in the browser: enter image description here

This is the exported image: enter image description here

JsFiddle: http://jsfiddle.net/vd0ptLu1/2/

Has anyone experienced the same issue? I see there are other similar questions about highcharts export, but the're all about the font size not working. Thanks for your help.

Upvotes: 0

Views: 1144

Answers (1)

Stefano Castriotta
Stefano Castriotta

Reputation: 2913

I solved by disabling text shadows.

plotOptions: {
    series: {
        dataLabels: {
            style: { textShadow: false },
        }
    }
}

http://jsfiddle.net/vd0ptLu1/3/

Upvotes: 3

Related Questions