Pie Chart with long labels cannot be seen

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
qcrnd
Advanced
Posts: 214
Joined: Mon Sep 04, 2006 12:00 am

Pie Chart with long labels cannot be seen

Post by qcrnd » Wed Apr 01, 2009 8:32 am

Hi
I have a pie chart and sometimes the labels can be very long. When they are too long then you dont see the chart. I was wondering if you have some automatic logic that will split the label into multi lines if its too long. I tried the property MultiLine but it didnt change anything.

attached is an example of what happens.
Image

Thanks.

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Wed Apr 01, 2009 9:11 am

Hi qcrnd,

You could use OnGetSeriesMarks to add as "\n" (end of line) as you need. Here there is a simple example that you could easily improve:

Code: Select all

void pie1_GetSeriesMark(Series series, GetSeriesMarkEventArgs e)
{
   if (e.MarkText.Length > 20)
   {
        e.MarkText = e.MarkText.Insert(20,"\n");
   }
}
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply