Page 1 of 1

DateTime Values

Posted: Mon Mar 08, 2004 2:44 pm
by 5892718
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?

Posted: Mon Mar 08, 2004 3:47 pm
by Marjan
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

Posted: Tue Mar 09, 2004 12:52 pm
by 5892718
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.