MasterAxis

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
franckgar
Advanced
Posts: 109
Joined: Thu Nov 04, 2004 5:00 am

MasterAxis

Post by franckgar » Wed Nov 24, 2004 10:19 am

Hello!

I assigned the propertie MasterAxis of an axis to an axis of another chart, but when I zoomed the master axis I didn't see modifications applied to other axes. Did someone test this functionality successfully ?

thanks
franckgar

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

Post by Pep » Thu Nov 25, 2004 2:52 pm

Hi,

basically all you must do is read (all) first chart axes minimum and maximum value and then use these values to set second chart axes minimum/maximum value (asigning the values in the SetMinMax method).
procedure TForm1.Chart1Zoom(Sender: TObject);
begin
Chart2.Axes.Bottom.SetMinMax(Chart1.Axes.Bottom.Minimum,Chart1.Axes.Bottom.Maximum);
Chart2.Axes.Left.SetMinMax(Chart1.Axes.Left.Minimum,Chart1.Axes.Left.Maximum);
end;
For both charts and also in the OnUndoZoom event.

Post Reply