TQRChart and datetime axis

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Shannon
Newbie
Newbie
Posts: 3
Joined: Sat Nov 10, 2001 5:00 am

TQRChart and datetime axis

Post by Shannon » Fri Aug 20, 2004 7:18 pm

I have a TQRChart, and I want the bottom axis to be a datetime axis.

I am using the following code to initialize the axis values:

With FirstHalf.BottomAxis do
begin
Increment:=DateTimeStep[dtOneHour];
DateTimeFormat:='hh:mm:ss';
RoundFirstLabel:=False;
Automatic := false;
SetMinMax(startTime, endTime);
end;

When I use a TChart component and just display the graph on the screen, the axis shows up correctly. When I try to use TQRChart so I can print the same graph, the quick report with this graph never shows up in the preview screen. I have traced it back to this block of code. For some reason, when it hits the "Increment :=" statement, it doesn't seem able to process that and never moves on to the next line of code. I tried commenting out the "Increment:=" statement, but then it gets stuck on the DateTimeFormat statement.

Has anyone else ever seen this problem? How do I get around this? I need to set the values of the axis at runtime.

Any help would be appreciated.

Thanks,
Shannon

Shannon
Newbie
Newbie
Posts: 3
Joined: Sat Nov 10, 2001 5:00 am

Nevermind

Post by Shannon » Fri Aug 20, 2004 7:57 pm

I figured out my problem. I was using the wrong chart object. I needed to reference the TQRDBChart when doing my axis scaling. Sorry.

Post Reply