Click here to Skip to main content
15,884,472 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I'm using the Chart Controls in VS2008 that is MSChart Control. Can anyone please help with any advice as to how to avoid overlapping my pie labels? I can't use "Outside" labels because it makes the pie so tiny.
I have tried Smart Label properties as shown below.
C#
Chart1.Series("Default").SmartLabelStyle.Enabled = True
Chart1.Series("Default").SmartLabelStyle.AllowOutsidePlotArea = LabelOutsidePlotAreaStyle.No

Chart1.Series("Default").SmartLabelStyle.CalloutLineAnchorCapStyle = LineAnchorCapStyle.None

Chart1.Series("Default").SmartLabelStyle.CalloutLineColor = Color.Red

Chart1.Series("Default").SmartLabelStyle.CalloutLineWidth = 1
Chart1.Series("Default").SmartLabelStyle.CalloutStyle = LabelCalloutStyle.None

which doesn't seem to make any difference.....

Please help me..
Posted
Updated 8-May-12 2:38am
v5
Comments
cesar_boucas 11-Apr-13 11:29am    
Add a legend to your chart: <legends><asp:Legend Name="l1">

Hi, I find this on msdn, it seems quite close to your suitation. Please refer:
http://social.msdn.microsoft.com/Forums/ar/MSWinWebChart/thread/01b14116-a03f-4eca-aaf8-edead25f656d[^]
 
Share this answer
 
Comments
Pritesh Aryan 10-May-12 6:15am    
I have already tried but doesn't help me much....you can see same type question on stackoverflow please refer...
http://stackoverflow.com/questions/10497392/mschart-pie-chart-label-overlapping-issue/10499502#comment13601525_10499502
Thank you so much for answering.....
As far as i know the only solution to prevent this would be to use a coulor coded chart key instead.
 
Share this answer
 
Comments
Pritesh Aryan 10-May-12 6:10am    
Colour Coded Chart key? couldn't understand please elaborate...thank you so much for answering

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900