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.)?
Label control - Datetime values
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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!
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 |
Instructions - How to post in this forum |
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
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
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Chris,
This is already possible. Which TeeChart version are you using?
Thanks in advance.
Ok, I've added this to the wish-list to be considered for inclusion in future releases.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.
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 |
Instructions - How to post in this forum |
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
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
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Chris,
Ok, I've added this to the wish-list too. In the meantime you can do this programmatically.
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 |
Instructions - How to post in this forum |