2016-06-11 2 views

답변

1

로드 이벤트를 catch하고 series.data 길이를 확인한 다음 비어있는 경우 렌더러를 사용하여 빈 원을 추가 할 수 있습니다.

chart: { 
      plotBackgroundColor: null, 
      plotBorderWidth: null, 
      plotShadow: false, 
      type: 'pie', 
      events:{ 
       load: function() { 
       var chart = this, 
        series = chart.series[0], 
        center = series.center; 

        if(series.data.length === 0) { 
        chart.renderer.circle(center[0],center[1],100) 
        .attr({ 
         fill:'rgba(0,0,0,0)', 
         stroke: 'red', 
         'stroke-width': 1 
        }) 
        .add(); 

        } 
       } 
      } 
     }, 

예 :

관련 문제