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

grenade picture grenade · Jan 27, 2010 · Viewed 32.9k times · Source

ugly pie chart

I can't seem to find the property that controls visibility of labels in pie charts. I need to turn the labels off as the information is available in the legend.

Anyone know what property I can use in code behind?

I tried setting the series labels to nothing Chart1.Series[i].Label = string.Empty; but the labels seem to show up anyway.

Answer

Ben picture Ben · Feb 21, 2011
Chart1.Series[i]["PieLabelStyle"] = "Disabled";

works too, and doesn't need to be set for each datapoint.