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
MasterAxis
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.
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.
Pep Jorge
http://support.steema.com
http://support.steema.com