2017-03-13 2 views
0

원형 차트가 있습니다. 나는 angular2-highcharts 라이브러리를 사용 중입니다.원형 차트 내부에 텍스트 표시

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

호버 온시 값을 표시합니다.

enter image description here

그러나 나는 그들이 그 조각 안쪽에 표시 할. 이

enter image description here

처럼 어떻게 이것을 달성 할 수 있습니까?

example is here

답변

2

highcharts에 plotOptions 추가

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

plunker 데모