DateTime Values

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
David
Newbie
Newbie
Posts: 6
Joined: Fri Nov 15, 2002 12:00 am

DateTime Values

Post by David » Mon Mar 08, 2004 2:44 pm

Sorry guys, needing even more help.

I am plotting a graph for the period of the day. I want to be able to see the whole day plotted against the bottom even when I have only plotted the part of it.

When I manually plot the graph it all works when I uncheck the automatic scales and set the min and max value. However, when using a DBChart this does not work.

Any ideas?

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Mon Mar 08, 2004 3:47 pm

Hi, David.

As far as changing axis scales and doing it manually, TChart and TDBChart should work the same. Are your series XValues really true datetime values ? How do you define axis range (minimum and maximum value) ? Using the following code it works just fine:

Code: Select all

With DBChart1.Axes.Bottom do
begin
  Automatic := False;
  SetMinMax(yourstartdate,yourenddate);
  // or SetMinMax(yourstartdate,yourstartdate+1.0); <- one day
end
Marjan Slatinek,
http://www.steema.com

David
Newbie
Newbie
Posts: 6
Joined: Fri Nov 15, 2002 12:00 am

Post by David » Tue Mar 09, 2004 12:52 pm

I had indeed done that in the past but thought it didn't work as the bars seemed to overlap each other and what I got was a jumbled mess. I have a stacked bar with 2 series using the same stack group.

When I changed the bar width to 10% for both bars it displayed fine but doesn't really help me understand why we get this overlapping issue.

Post Reply