I need day and week intervals.
So I had to add:
if AStep<dtHalfMonth then
begin
Case AStep of
dtOneDay: result:=round(ADate);
dtTwoDays: result:=round(ADate/2.0)*2;
dtThreeDays: result:=round(ADate/3.0)*3;
dtOneWeek: result:=2.0+round((ADate-2.0)/7.0)*7;
else result:=ADate;
end;
end
else
begin
DecodeDate(ADate,Year,Month,Day);
Case AStep of ... (original code)
Apart from that, TeeRoundDate is (also) unable to round dates before 1-1-1900. Can you fix this please?
TeeRoundDate -> smaller interval than half-month
-
- Newbie
- Posts: 31
- Joined: Thu Feb 22, 2007 12:00 am
- Location: Nijmegen, Netherlands
- Contact:
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Hans,
Those TDateTimeSteps are already available in TeeChart v7 VCL. Which TeeChart version are you using?
Those TDateTimeSteps are already available in TeeChart v7 VCL. Which TeeChart version are you using?
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 |
-
- Newbie
- Posts: 31
- Joined: Thu Feb 22, 2007 12:00 am
- Location: Nijmegen, Netherlands
- Contact:
Using TeeChart 7.07
Yep I know these steps are available, only teeRoundDate does not like these intervals causing strange behavior in when using date axis...
I also have a patch fixing the problem when too many labels are generated. eg create chart for 100 years with day resolution data, and all labels will be overlapping each other, which lookes quite messy.
I also have a patch fixing the problem when too many labels are generated. eg create chart for 100 years with day resolution data, and all labels will be overlapping each other, which lookes quite messy.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Hans,
If you leave your axes increment to automatic TeeChart will calculate the increment so that labels don't overlap. And if you zoom the chart the increment will be automatically recalculated.
If you leave your axes increment to automatic TeeChart will calculate the increment so that labels don't overlap. And if you zoom the chart the increment will be automatically recalculated.
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 |
-
- Newbie
- Posts: 31
- Joined: Thu Feb 22, 2007 12:00 am
- Location: Nijmegen, Netherlands
- Contact:
I'll have to check this
In TeeChart6 I needed this to avoid overlapping labels.
If it is fixed in TeeChart7: great, another patch can be left out!
I'll let you now my findings!
If it is fixed in TeeChart7: great, another patch can be left out!
I'll let you now my findings!
-
- Newbie
- Posts: 31
- Joined: Thu Feb 22, 2007 12:00 am
- Location: Nijmegen, Netherlands
- Contact:
Confirmed
This patch is not needed anymore!
happy happy happy
joy joy joy
happy happy happy
joy joy joy