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_boxplot
Class: TBoxPlot
Declaration: property OnZoomPan: TZoomPanEvent;
{TZoomPanEvent = procedure (Sender: TObject) of object;}

The event OnZoomPan occurs after the viewport of the boxplot chart has been zoomed or panned.

This event may be used to synchronize the viewports of several boxplots. Suppose you want to make sure that some boxplot "BP2" always follows the range of the displayed area of another boxplot "BP1". This can be easily achieved by setting the range of boxplot 2 when the OnZoomPan event is triggered:

  procedure TForm1.BP1ZoomPan(Sender: TObject);

  begin
  BP2.SetRange (BP1.Scale1X.RangeLow, BP1.Scale1Y.RangeLow,
                BP1.Scale1X.RangeHigh, BP1.Scale1Y.RangeHigh);
  end;

Note: You should always use the method SetRange (instead of the Scale1X and Scale1Y properties) 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: 2023-Dec-13