TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
-
qcrnd
- Advanced
- Posts: 214
- Joined: Mon Sep 04, 2006 12:00 am
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.
Thanks.
-
Yeray
- Site Admin

- Posts: 9648
- 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");
}
}