Hi
I've created an AxisArrow tool and associated it with my x-axis. The x-axis is time based. I've set the ScrollPercent on the AxisArrow to 10 percent. When I click on the left most arrow the start and end times of the x-axis are set back in time by 10% as expected. I need to be able to read the new start and end times that have been set on the x-axis so that I can feed these into a query that will be sent to our server to retrieve data between the new start and end times.
Is there a way I can read the x-axis start and end times, in order to achieve this functionality?
thanks,
Ben.
Discovering new axis start and end times using AxisArrow
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Ben,
Yes, you can try using tChart1.Axes.Bottom.Minimum and tChart1.Axes.Bottom.Maximum.
Hope this helps!
Yes, you can try using tChart1.Axes.Bottom.Minimum and tChart1.Axes.Bottom.Maximum.
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 |
... and these return doubles, so I'm using DateTime.FromOADate(...) to convert the double values to DateTime values - is this OK to do?
Also, I'm presuming this same mechanism will work for custom axes that are time based...
Narcís, is there a way to have the TeeChart time based axes automatically comply with the time format specified in the Regional Settings?
thanks,
Ben.
Also, I'm presuming this same mechanism will work for custom axes that are time based...
Narcís, is there a way to have the TeeChart time based axes automatically comply with the time format specified in the Regional Settings?
thanks,
Ben.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Ben,
Yes, that's right.
Yes, that's right.
You should set tChart1.Axes.Bottom.Labels.DateTimeFormat to your machine's Regional Settings DateTime format, something like this:Narcís, is there a way to have the TeeChart time based axes automatically comply with the time format specified in the Regional Settings?
Code: Select all
tChart1.Axes.Bottom.Labels.DateTimeFormat = Application.CurrentCulture.DateTimeFormat.ShortTimePattern;
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 |
Hey thanks Narcís!
It looks like I can logically OR ShortTimePattern and ShortDatePattern values, so that the labels are presented giving both the current DD/MM/YY and time information, so this works well.
Another prevalent problem I'd like to solve is one of displaying time labels at the first tick and last tick of the data presented. So for example right now, if I have my tick intervals at say 15 mins and the start point is at 12:46 and the end point is at 5:14, that first and last ticks are not labelled and it makes it diffucult to see where the actual start and end of data is, just by looking at the first and last labels. Do you have any recommendations on this issue?
thanks,
Ben.
It looks like I can logically OR ShortTimePattern and ShortDatePattern values, so that the labels are presented giving both the current DD/MM/YY and time information, so this works well.
Another prevalent problem I'd like to solve is one of displaying time labels at the first tick and last tick of the data presented. So for example right now, if I have my tick intervals at say 15 mins and the start point is at 12:46 and the end point is at 5:14, that first and last ticks are not labelled and it makes it diffucult to see where the actual start and end of data is, just by looking at the first and last labels. Do you have any recommendations on this issue?
thanks,
Ben.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Ben,
The only solution I can think of is using custom labels as shown in this thread.
Hope this helps!
The only solution I can think of is using custom labels as shown in 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 |