Page 1 of 1

Zooming of custom axis?

Posted: Thu Mar 04, 2004 10:58 am
by 8439980
What is the bet way to do zooming with custom axes automatically. They do not react like the 4 basic axes and it looks confusing when trying to focus parts of a data set.
Can I include them in the OnZoom event of the chart itself? Do you have a simple example code for the best way to do so?

Thanks Jan
(Delphi 7/ TeeChart 6)

Posted: Thu Mar 04, 2004 1:58 pm
by Pep
Hi Jan,

click at the following link to see how to Zoom/UnZoom with custom axes :
http://www.teechart.net/support/modules ... labels#172"

IZoom?

Posted: Thu Apr 08, 2004 10:16 pm
by 9336283
From the OnZoom event with this example, I didn't find the property IZoom for a TChart (considering Chart1 is a TChart object in your example) using TeeChart version 6.01 for Delphi 6. Why?


Shouldn't the min and max values of the series' axis be set to the min and max values of the zoomed part of the series? How are the zoomed min and max values of a series determined? I know a TChartSeries has MinYValue and MaxYValue methods but these aren't what you need when you are zoomed.

Posted: Fri Apr 09, 2004 4:21 am
by Marjan
Hi, Damon.

In TeeChart v6 (and above) the IZoom struct was replaced with Zoom struct. So, for TeeChart v6 and above, the correct code is:

Code: Select all

procedure TForm1.Chart1Zoom(Sender: TObject);
begin
  With Series1.GetVertAxis do
    SetMinMax(CalcPosPoint(Chart1.Zoom.Y1),CalcPosPoint(Chart1.Zoom.Y0));
end;
Axis scales are adjusted only for "regular" left, right, top, bottom and depth axis. Custom axis scale is not adjusted i.e. you have to use the code above to do perform the scale operation.