Page 1 of 1

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

Posted: Tue Oct 25, 2005 10:00 am
by 9637812
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

Posted: Tue Oct 25, 2005 12:46 pm
by narcis
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();
		}

Posted: Tue Oct 25, 2005 1:44 pm
by 9637812
ok but what if I want to get the labels without responding to an event? I want to change them programatically.

Thanks in advance

Posted: Tue Oct 25, 2005 2:01 pm
by narcis
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.