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



AutoRangeXOnly


Unit:SDL_rchart
Class: TRChart
Declaration: [1] procedure AutoRangeXOnly (Layer: integer; Margin: double);
[2] procedure AutoRangeXOnly (Layer: integer; Margin, MinRange: double);

The method AutoRangeXOnly sets the bounds of the x-axis such, that all x-coordinates of all graphics elements of the layer specified by the parameter Layer fall within the range of the x-axis. If Layer is zero, all layers are affected by the method, setting the x-axis of each layer to its optimum range. The parameter Margin specifies an optional margin in percent of the length of the axis. Values between 2 and 5 percent usually deliver good results. The optional parameter MinRange specifies the minimum required range in percent of the middle value of the axis (that is the average of the highest and the lowest value). This parameter can be used to prevent the chart from zooming too much into the data if the variation of the data in relation to the absolute values is low.

Please note that the width of lines, elements with relative pixel coordinates (such as DrawToRelPix), and the extents of text elements are not included in the autoranging calculations. This implies that lines  having a width greater than 1 may be displayed only partially. The same is true for texts  which may be shown only partially since the text reference point depends on the TextAlignment property.

The property Isometric is automatically set to FALSE whenever AutoRangeXOnly is called.

Hint: Please note that the number of layers is restricted to two in the Light Edition of the SDL Suite.



Last Update: 2012-Oct-20