|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....|
|Home ChartPack RChart Class TSmithChart Methods AutoRange|
|See also: RangeXHigh, RangeXLow, RangeYHigh, RangeYLow, SetRange|
The method AutoRange sets the bounds such, that all graphics elements are visible (i.e. can be displayed within the chart window) and the directions of the axes are positive. The parameter Margin specifies an optional margin in percent of the chart area. 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 each 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 extents of text elements are not included in the autoranging calculations. This implies that lines with a width greater than 1 may be displayed only partially (if the line element is the most outward element). The same is true for texts which may be shown only partially since the text reference point depends on the TextAlignment property.