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....



SetEqualRangeXOnly


Unit:SDL_rchart
Class:TRChart
Declaration:procedure SetEqualRangeXOnly (Layers: TLayerSet);

The method SetEqualRangeXOnly sets the extents of the x-axes of all layers specified by the parameter Layers in a way that these layers use the same x-scale. The new common scale is derived from the minimum and maximum ranges of the individual scales.

Hint: Please note the subtle difference between SetEqualRange and AutoRange. While AutoRange actually adjusts the scales to cover the entire data range, SetEqualRange compares only the current scale settings to find the maximum common range of all scales of the specified layers.

Example: This method is primarily used to ensure comparable scales for a set of layers. Let us assume that we have three layers, 2, 3, and 6, with the following ranges of their respective axes:
  Layer 2: x-axis ..... -3 to +20
           y-axis ..... 0 to +100
  Layer 3: x-axis ..... 0 to +1
           y-axis ..... -20 to -1
  Layer 6: x-axis ..... -5 to +10
           y-axis ..... +10 to +20
Executing the statement SetEqualRangeXOnly ([2,3,6]); changes the ranges of the x-axes of these three layers as follows:
  all three x-axis: .... -5 to +20
  all three y-axis: .... left unchanged
Thus all the data is now displayed using the common scale on the x-axis.



Last Update: 2016-Jan-31