Needs to Customize the Zoom operation

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Krishna
Newbie
Newbie
Posts: 16
Joined: Mon Jun 12, 2006 12:00 am
Contact:

Needs to Customize the Zoom operation

Post by Krishna » Wed Aug 02, 2006 5:20 am

hi,

I need to restrict the zoom as per the axis instead of complete chart area.

eg: There are two series one is based on left vertical axis and another is based on the right vertical axis. The graph based on left verical axis should zoom in both directions where as graph based on right axis should zoom only horizontal. All should be done at a same time.

Is it possible to restrict the zoom as mentioned above?

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

Post by Pep » Wed Aug 02, 2006 8:12 am

Hi,

yes, using the following code should do the trick :

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var tmp: TChartAxis;
begin
        Series1.FillSampleValues(20);
        Series2.FillSampleValues(20);
        tmp:=TChartAxis.Create(Chart1);
        tmp.OtherSide:=true;
        tmp.PositionPercent:=20;
        Series2.CustomVertAxis:=tmp;
end;
The Chart will zoom horizontally for both Series but only the Series1 will zoom vertically.

Post Reply