Page 1 of 1

Needs to Customize the Zoom operation

Posted: Wed Aug 02, 2006 5:20 am
by 9346574
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?

Posted: Wed Aug 02, 2006 8:12 am
by Pep
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.