Problem with X Axis label

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
CA Rodger
Newbie
Newbie
Posts: 5
Joined: Wed Mar 10, 2004 5:00 am

Problem with X Axis label

Post by CA Rodger » Thu Jul 21, 2005 3:15 pm

I am using D5 with RB7.04 and TeeChart 7.04.

I have a TppDPTeeChart on my form and I set the Bottom Axis Label format Date time format to mmm/yyyy.

When viewing the graph in design mode the botom label displays properly (Dec/2005).

When I run the application the label is displayed wrong. It comes out as 12/1/2005

Why does it not display properly when running? How can I fix it?

Thanks in advance,
Rodger

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jul 21, 2005 3:25 pm

Hi Rodger,

Are you setting this format at design-time? It could be that with TppDPTeeChart, at design-time, this property is not stored. You could try setting it at run-time.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

CA Rodger
Newbie
Newbie
Posts: 5
Joined: Wed Mar 10, 2004 5:00 am

Post by CA Rodger » Thu Jul 21, 2005 6:17 pm

I tried the following code and no change its still displaying the labels incorrectly.

ppDPTeeChart1.Chart.BottomAxis.DateTimeFormat := 'mm-yyyy'


Rodger

Pep
Site Admin
Site Admin
Posts: 3299
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Fri Jul 22, 2005 10:49 am

Hi Rodger,

could you please test if the same code you're using works fine with a TDBChart component ? Also, remember to set the XValues do datetime before to add the data : Series1.XValues.DateTime := true;

If it only happens with the tppChart component (the RB TDBChart
wrapper) contact with Digital Metaphors and ask for a patch file.

CA Rodger
Newbie
Newbie
Posts: 5
Joined: Wed Mar 10, 2004 5:00 am

Post by CA Rodger » Thu Jul 28, 2005 11:59 pm

I tried it with a TDBChart and still get the same result.

Regards,

Rodger

Pep
Site Admin
Site Admin
Posts: 3299
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Aug 01, 2005 10:58 am

Hi Rodger,

using the following line works fine here (with DBChart) :
dbChart1.Axes.Bottom.DateTimeFormat := 'mmm-yyyy';

Could you please check if it works for you ?

CA Rodger
Newbie
Newbie
Posts: 5
Joined: Wed Mar 10, 2004 5:00 am

Post by CA Rodger » Mon Aug 08, 2005 9:53 pm

Nope wasn't working for me. I tried
DBChart1.Axes.Bottom.DateTimeFormat := 'mmm-yyyy';

and

DBChart1.BottomAxis.DateTimeFormat := 'mmm-yyyy';

neither worked. I have the series DataSource set to DataSet with the Dataset set to the name of my query. I have the Date Column set in both the Labels and the X property with the DateTime checkbox checked.

Is there something wrong there?

Thanks in advance,
Rodger

CA Rodger
Newbie
Newbie
Posts: 5
Joined: Wed Mar 10, 2004 5:00 am

Post by CA Rodger » Mon Aug 08, 2005 10:07 pm

Found the problem. The Labels property needed to be blank and Iwas setting it to the same as the X property. Not quite sure what should have been there or I guess I'm not quite sure how these settings should be set.

Thanks,
Rodger

Post Reply