AutoRange

Declaration: ChartBook.Charts[].AutoRange(Layer: integer; Margin: double);
The method AutoRange adjusts the layer axes in such a way that all graphics elements of the layer specified by the parameter Layer are visible (i.e. can be displayed within the chart window) and the directions of the axes are positive. If Layer is zero, all visible layers are affected by AutoRange, setting the axes of each layer to their optimum values. The parameter Margin specifies an optional margin (given in a percentage of the chart area). Values between 2 and 5 percent usually deliver good results.

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

Hint 1: If the property Isometric is set to TRUE, AutoRange adjusts only the x-axis and the lower bound of the y-axis. The upper bound of the y-axis is adjusted in such a way that the resulting plot is isometric.