Label control - Datetime values

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Chris
Newbie
Newbie
Posts: 5
Joined: Mon Sep 15, 2008 12:00 am
Location: USA

Label control - Datetime values

Post by Chris » Wed Oct 08, 2008 5:08 pm

Is it possible to force datetime axis labels to coincide with the beginning of a month or year?

I'm plotting a line series that has been defined as datetime for the horizontal axis. My data is unevenly spaced, and it spans many years. If I specify a label format of MMM-yyyy, the first axis label begins with the month of December (e.g., Dec-1987). Subsequent labels also begin with December. This is awkward. Is there a way to force the labels to coincide with the beginning of each year (e.g., Jan-1987, Jan-1988, Jan-1989, etc.)?

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

Post by Narcís » Thu Oct 09, 2008 8:22 am

Hi Chris,

I can think of two options here:

1. Use GetNextAxisLabel event as in the examples here:

http://www.teechart.net/support/viewtopic.php?t=4552
http://www.teechart.net/support/viewtopic.php?t=8392

2. Use custom labels as suggested on this thread.

Hope this helps!
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

Chris
Newbie
Newbie
Posts: 5
Joined: Mon Sep 15, 2008 12:00 am
Location: USA

Post by Chris » Tue Oct 14, 2008 12:32 am

Thanks for the response.

It took me a while, but I think I've found a reasonable solution using the GetNextAxisLabel event.

As a feature request, it would be nice if TeeChart would allow the user to specify the value of the first tick. This would eliminate the need for semi-complex event handlers that compute values of the tick labels. Some of the better stand-alone charting applications such as Origin (http://www.originlab.com/) allow you to specify the value of the first tick label, and it gives the user a simple way to standardize the labels. Also, I think the Chart Editor should enable the user to specify standard increments (e.g., second, minute, hour, day, year, etc.) for DateTime data.

Chris

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 14, 2008 8:13 am

Hi Chris,
As a feature request, it would be nice if TeeChart would allow the user to specify the value of the first tick. This would eliminate the need for semi-complex event handlers that compute values of the tick labels. Some of the better stand-alone charting applications such as Origin (http://www.originlab.com/) allow you to specify the value of the first tick label, and it gives the user a simple way to standardize the labels.
Ok, I've added this to the wish-list to be considered for inclusion in future releases.
Also, I think the Chart Editor should enable the user to specify standard increments (e.g., second, minute, hour, day, year, etc.) for DateTime data.


This is already possible. Which TeeChart version are you using?

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

Chris
Newbie
Newbie
Posts: 5
Joined: Mon Sep 15, 2008 12:00 am
Location: USA

Post by Chris » Tue Oct 14, 2008 3:56 pm

Thanks for adding the feature request.

I'm using TeeChart .Net Version 3 (right-clicking on a chart and selecting About Steema TeeChart pops up a dialog with 3.5.3146.24806 at the bottom).

After some experimenting, I see that the Chart Editor does allow the user to specify standard datetime increments. Sorry for my oversight. However, I noticed that the largest standard increment allowed is one year. Increments of 2 years, 5 years, or even 10 years would be helpful in some applications. Moreover, the Custom Increment option on the Desired Bottom Axis Increment Dialog does not appear to accept datetime intervals such as 3 hours or 2 years.

Thanks,
Chris

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 Oct 15, 2008 9:11 am

Hi Chris,

Ok, I've added this to the wish-list too. In the meantime you can do this programmatically.
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