How to truncate legend in a chart?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Level IT
Newbie
Newbie
Posts: 4
Joined: Wed Dec 07, 2005 12:00 am

How to truncate legend in a chart?

Post by Level IT » Tue Jan 08, 2008 9:14 am

Hello,

I have a problem with large texts in legend, maybe someone has a solution to this problem?

The legend is at the bottom of my chart so that is has the maximum width availlable. But sometimes the chart width must be rather small, and TeeChart then hides the legend (or moves it outside the chart, I don't know).

What I would like to do is to wrap or truncate the texts that are too long, which is far better than having no legend at all.
I read on this forum that TeeChart supports none of these functionnalities, but that it is possible to do it by hooking up the GetLegendText event.

The problem here is that GetLegendText is a TChart event, and I'm using a Chart which doen't not have this event...

Maybe someone has another solution?

Regard,

Cédric Richard
Analyst - Developer @ Level IT
http://www.level-it.be

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Jan 08, 2008 9:22 am

Hi Cédric,

Maybe you could try processing legend items like this:

Code: Select all

			foreach (Steema.TeeChart.LegendItem li in tChart1.Legend.Items)
			{
				//process li.Text here				
			}
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply