I need to show dates before 1-1-1900, (back to 1-1-1850!)
Is there a specific reason why Function TChartAxis.LabelValue
says
if Value>=0 then...
It makes it impossible to display dates before 1-1-1900
(I had to patch it in teechart sourcecode)
Dates before 1900
-
- 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,
Yes, this is because TDateTime's implementation in the VCL as you can see in Delphi's help files.
However, you could use something like this unit.
Yes, this is because TDateTime's implementation in the VCL as you can see in Delphi's help files.
However, you could use something like this unit.
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:
Easy patch
All I did was replace the if aDate>0 then... by
if True then...
And it works like a charm. When using negative date values now,
labels are omitted until 1900 and then displayed... ???
if True then...
And it works like a charm. When using negative date values now,
labels are omitted until 1900 and then displayed... ???
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Hans,
Ok, thanks for the information.
In that case you can add the labels using Add method's override Add(YValue,Label,Color) or AddXY(XValue,Label,Color). Another option would be customizing the labels in the OnGetAxisLabel event.
Ok, thanks for the information.
In that case you can add the labels using Add method's override Add(YValue,Label,Color) or AddXY(XValue,Label,Color). Another option would be customizing the labels in the OnGetAxisLabel event.
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 know..
But I'd rather be able to display dates before 1900 as default behavior than having to write an event handler for this in every spot where I use TCharts.
(Over 300!)
(Over 300!)
-
- Newbie
- Posts: 31
- Joined: Thu Feb 22, 2007 12:00 am
- Location: Nijmegen, Netherlands
- Contact:
I uploaded word document with example
I just applied the
"If True" Patch
Check out Pre_1900_Dates.doc
which I just uploaded.
"If True" Patch
Check out Pre_1900_Dates.doc
which I just uploaded.