Use DateTime series values as axis labels ?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
steve
Newbie
Newbie
Posts: 5
Joined: Tue Feb 10, 2004 5:00 am
Location: UK

Use DateTime series values as axis labels ?

Post by steve » Tue Feb 14, 2006 3:27 pm

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.

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

Post by Narcís » Wed Feb 15, 2006 11:42 am

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;
				} 
			}  
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