Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 451
grenade Avatar asked Jan 27 '10 15:01

grenade


1 Answers

Chart1.Series[i]["PieLabelStyle"] = "Disabled";

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

like image 163
Ben Avatar answered Oct 06 '22 00:10

Ben