Page 1 of 1

MasterAxis

Posted: Wed Nov 24, 2004 10:19 am
by 9339785
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

Posted: Thu Nov 25, 2004 2:52 pm
by Pep
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.