Page 1 of 1

TChart botton range of graph

Posted: Thu Jan 08, 2004 8:31 pm
by 4212043
I have a Delphi Tchart designed and working great. The problem is that the customer has now called and wants us to make the bottom range a set value instead of having it automatically set based on the data fed to the chart.

Is there a way to set the bottom range to say 1000 and have the graph just stop at whatever point its time ends? ie: If I've only logged 500 hours then the chart would move across to the middle of the graph and just stop with the last point in the middle of the graph?

Thanks,

glenn

Posted: Thu Jan 08, 2004 9:48 pm
by Marjan
Hi, Glenn.

In case you want to manually set axis range, this can be done by using axis SetMinMax method. For example:

Code: Select all

var StartPoint,Range : double;
StartPoint := 0.0;
Range := 1000.0;
With Chart1.Axes.Bottom do
begin
  Automatic := False;
  Increment := Range / 10; // show 10 labels, just an example
  SetMinMax(StartPoint, StartPoint+Range);
end;

Posted: Fri Jan 09, 2004 9:37 pm
by 4212043
Marjan,

thanks a lot, that worked perfectly. Had to change the class method name a little but other than that it worked perfectly. For those interested the exact name is:

Chart1.BottomAxis

thanks again,

glenn

Posted: Mon Jan 12, 2004 11:11 am
by Pep
Hi glenn,

ok, yes this will do the same, but in the TeeChart Pro v6 we've introduced a new property (Chart.Axes.) which we recommend to use it instead.

Josep Lluis Jorge
http://support.steema.com