Page 1 of 1

Use DateTime series values as axis labels ?

Posted: Tue Feb 14, 2006 3:27 pm
by 8123805
Hi,
Is it possible to force an axis to use the datetime information in a series for its labels (space permitting).

We have data that needs plotting at specific user defined unique dates but the axes labelling does not use these dates but calculates some other intermediate dates between the automatic (or set) Min and Max values.

Any suggestions ?

Thanks.

Posted: Wed Feb 15, 2006 11:42 am
by narcis
Hi steve,

You can try using something like the code below in the GetNextAxisLabel event.

Code: Select all

			if(((Steema.TeeChart.Axis)sender).Equals(tChart1.Axes.Bottom)) 
			{                             
				e.Stop = false;                
				switch(e.LabelIndex) 
				{ 
					case 0: e.LabelValue = line1.XValues[e.LabelIndex]; break;                     
					case 1: e.LabelValue = line1.XValues[e.LabelIndex]; break;                    
					case 2: e.LabelValue = line1.XValues[e.LabelIndex]; break;                    
					default: e.Stop = true; break;
				} 
			}