Page 1 of 1

Pie Chart with long labels cannot be seen

Posted: Wed Apr 01, 2009 8:32 am
by 9092401
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.

Posted: Wed Apr 01, 2009 9:11 am
by yeray
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");
   }
}