Hide labels in pie charts (MS Chart for .Net)

前端 未结 7 1333
梦毁少年i
梦毁少年i 2021-01-03 23:01

\"ugly

I can\'t seem to find the prope

7条回答
  •  礼貌的吻别
    2021-01-03 23:21

    Found the answer here: http://social.msdn.microsoft.com/Forums/en-US/MSWinWebChart/thread/32ccd993-5f43-47a3-bcbc-e772a13a87fe

    It turns out there is an obscure DataPointCustomProperty called PieLabelStyle that governs label visibility in pie charts. Worse still, the property must be set on each data point.

    for (var i = 0; i < chart.Series.Count; i++) 
        for (var j = 0; j < chart.Series[i].Points.Count; j++)
            chart.Series[i].Points[j]["PieLabelStyle"] = "Disabled";
    

提交回复
热议问题