0

I have pie chart. I'm using angular2-highcharts library

title : { text : 'simple chart' },
        series: [{
            data: [29.9, 71.5, 106.4, 129],
        }],
        chart: {
            type: 'pie'
        }

On hover it displays values.

enter image description here

But I want them to be displayed inside that piece. like this

enter image description here

How can I achieve this?

example is here

gsiradze
  • 4,583
  • 15
  • 64
  • 111

1 Answers1

2

Add plotOptions in highcharts

plotOptions: {
        pie: {
            dataLabels: {
                enabled: true,
                formatter: function() {
                    return this.y;
                },
                distance: -30,
                color:'white'
            }
        }
    },

plunker demo

Deep 3015
  • 9,929
  • 5
  • 30
  • 54