change x axis label

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Nati
Newbie
Newbie
Posts: 37
Joined: Mon Jun 29, 2009 12:00 am

change x axis label

Post by Nati » Mon Nov 15, 2010 1:45 pm

hi

i have a chart that in its x axis we show a date (type datetime out of a cds) in a format dd/mm/yy.
all is well, but now i want to add the day of week for that date.
i didnt find any tool that does that so i tried to use the event: Chart1GetAxisLabel but it never seems to be triggered
no matter what i set in labels-style.

im using teechart 8.05
what am i missing?
how can i add the "day of week" to show near the date itself?
thanks

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: change x axis label

Post by Yeray » Tue Nov 16, 2010 1:36 pm

Hi Nati,

You have to set a DateTimeFormat following the rules you can see here. For example:

Code: Select all

Chart1.Axes.Bottom.DateTimeFormat:='ddd dd/MM/yyyy';
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Nati
Newbie
Newbie
Posts: 37
Joined: Mon Jun 29, 2009 12:00 am

Re: change x axis label

Post by Nati » Tue Nov 16, 2010 4:14 pm

10x
it worked!

Post Reply