tChart.Axes.Top.Labels.Items.Count == 0!!

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Cinin
Newbie
Newbie
Posts: 9
Joined: Thu Jul 21, 2005 4:00 am

tChart.Axes.Top.Labels.Items.Count == 0!!

Post by Cinin » Tue Oct 25, 2005 10:00 am

When I try to read top or bottom axes labels in a gantt chart it says they are empty while the gantt is full of them (datetime)! while tChart.Axes.Left.Labels.Items.Count is correctly set to 3.

The only difference is that I populate the left axis by myself while top and bottom are populated by teechart.

Any idea? Thanks in advance

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 Oct 25, 2005 12:46 pm

Hi Cinin,

This is as designed. The Labels.Items array is only populated when using custom labels. If you want to iterate through standard labels you will have to use OnGetAxisLabels event, i.e.:

Code: Select all

		private void tChart1_GetAxisLabel(object sender, Steema.TeeChart.GetAxisLabelEventArgs e)
		{
			if (sender == tChart1.Axes.Left) e.LabelText="Label "+e.ValueIndex.ToString();
		}
Last edited by Narcís on Tue Oct 25, 2005 2:00 pm, edited 1 time in total.
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

Cinin
Newbie
Newbie
Posts: 9
Joined: Thu Jul 21, 2005 4:00 am

Post by Cinin » Tue Oct 25, 2005 1:44 pm

ok but what if I want to get the labels without responding to an event? I want to change them programatically.

Thanks in advance

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 Oct 25, 2005 2:01 pm

Hi Cinin,

Could you please be more specific on what are you trying to get so that we can help you finding a solution for it?

Thanks in advance.
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