Zooming of custom axis?

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

Zooming of custom axis?

Post by Jan » Thu Mar 04, 2004 10:58 am

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)

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Mar 04, 2004 1:58 pm

Hi Jan,

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

Damon
Newbie
Newbie
Posts: 4
Joined: Wed Mar 10, 2004 5:00 am

IZoom?

Post by Damon » Thu Apr 08, 2004 10:16 pm

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.

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

Post by Marjan » Fri Apr 09, 2004 4:21 am

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.
Marjan Slatinek,
http://www.steema.com

Post Reply