Don't zoom th right axis

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Werner
Newbie
Newbie
Posts: 46
Joined: Mon Aug 06, 2007 12:00 am

Don't zoom th right axis

Post by Werner » Wed Oct 26, 2011 1:59 pm

Hi,

I have a teechart (V8.07) with left axis, bottom axis and a right axis.
No I want to zoom, so that the left axis and bottomaxis are scaled but the right axis remains with the origin values.
For example the right axis was from 0..100% in the unzoomed mode. after zooming the left and bottoms axis are new scaled, but the right axis has 0..100%.
Furthermore the curves connected to the right axis should remain there y-values but zoom the x-values.

Is that possible ?

with best regards
Werner

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Don't zoom th right axis

Post by Yeray » Thu Oct 27, 2011 7:59 am

Hello Werner,

This is the default behaviour of the custom axes, so the easiest would probably be to use a custom axis instead of the right axis.
For example:

Code: Select all

uses Series;

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
  Chart1.View3D:=false;
  Chart1.Legend.Visible:=false;

  Chart1.CustomAxes.Add;
  Chart1.CustomAxes[0].OtherSide:=true;
  for i:=0 to 1 do
  begin
    Chart1.AddSeries(TFastLineSeries).FillSampleValues();
    if (i mod 2 = 0) then
    begin
      Chart1[i].Pen.Width:=2;
      Chart1[i].CustomVertAxis:=Chart1.CustomAxes[0];
    end;
  end;

  Chart1.MarginRight:=7;  //custom axes don't set the margin to fit the labels automatically
end;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply