The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



OnZoomPan


Unit: SDL_rchart
Class: TContourPlot
Declaration: property OnZoomPan: TZoomPanEvent;

The event OnZoomPan occurs after the viewport of the contour plot window has been zoomed or panned. This event may be used to synchronize the viewports of several charts. Suppose you want to make sure that some plot "CP2" always follows the range of the displayed area of another plot "CP1". This can be easily achieved by setting the range of plot 2 when the OnZoomPan event is triggered:

  procedure TForm1.CP1ZoomPan(Sender: TObject);

  begin
  CP2.SetRange (CP1.ScaleX.RangeLow, CP1.ScaleY.RangeLow,
                CP1.ScaleX.RangeHigh, CP1.ScaleY.RangeHigh);
  end;

Note: You should always use the method SetRange (instead of the properties RangeLow and RangeHigh) for setting the displayed range of the chart, since setting the scale boundaries one after another would trigger automatic redraws and thus would slow down the display.



Last Update: 2012-Oct-20