double dMaxSS = Math.max(sc.getStartShift(), aax.getMaxStartShift()); double dMaxES = Math.max(sc.getEndShift(), aax.getMaxEndShift());
    private final void updateOverlayAxes(AllAxes aax) throws DataFormatException, GenerationException,        UnexpectedInputException    {        int iDirection = (aax.getOrientation() == HORIZONTAL) ? 1 : -1;        final Axis[] axa = cwa.getPrimaryBaseAxes();        final Axis axPrimaryBase = axa[0]; // NOTE: FOR REL 1 AXIS RENDERS, WE        // SUPPORT A SINGLE PRIMARY BASE AXIS        // ONLY        final Axis[] axaOverlayOrthogonal = cwa.getOrthogonalAxes(axPrimaryBase, false);        OneAxis axOverlay, axPrimary = aax.getPrimaryOrthogonal();        AutoScale scOA, sc = axPrimary.getScale();        double dMaxSS = Math.max(sc.getStartShift(), aax.getMaxStartShift());        double dMaxES = Math.max(sc.getEndShift(), aax.getMaxEndShift());        double dStart, dEnd;        Object[] oaMinMax;        FontDefinition fd = null;        Object oaData;        int iAxisType = (aax.getOverlayCount() > 0) ? aax.getOverlay(0).getScale().getType() : 0;        Label la;        for (int i = 0; i < aax.getOverlayCount(); i++)        {            axOverlay = aax.getOverlay(i);            la = axOverlay.getLabel();            fd = la.getCaption().getFont();            scOA = axOverlay.getScale();            scOA.setEndPoints(scOA.getStart() - scOA.getStartShift() * iDirection, scOA.getEnd() + scOA.getEndShift()                * iDirection);            /*             * dStart = scOA.getStart() + dMaxSS * iDirection; dEnd = scOA.getEnd() - dMaxES * iDirection;             */            dStart = sc.getStart();            dEnd = sc.getEnd();            scOA.setEndPoints(dStart, dEnd);            scOA.computeTicks(ids, la, axOverlay.getLabelPosition(), aax.getOrientation(), dStart, dEnd, false, null);            if (!scOA.isStepFixed())            {                oaMinMax = scOA.getMinMax();                while (!scOA.checkFit(ids, la, axOverlay.getLabelPosition()))                {                    scOA.zoomOut();                    scOA.updateAxisMinMax(oaMinMax[0], oaMinMax[1]);                    scOA.computeTicks(ids, la, axOverlay.getLabelPosition(), aax.getOrientation(), dStart, dEnd,                        false, null);                }            }            // SETUP THE FULL DATASET FOR THE PRIMARY ORTHOGONAL AXIS            scOA.setData(getTypedDataSet(axaOverlayOrthogonal[i], iAxisType, 0));        }        /*         * if (aax.areAxesSwapped()) { final AutoScale scPrimaryHorizontal = aax.getPrimaryOrthogonal().getScale();         * scPrimaryHorizontal.setEndPoints( scPrimaryHorizontal.getStart() + scPrimaryHorizontal.getEndShift(),         * scPrimaryHorizontal.getEnd() - scPrimaryHorizontal.getStartShift() ); } else { final AutoScale         * scPrimaryHorizontal = aax.getPrimaryBase().getScale(); scPrimaryHorizontal.setEndPoints(         * scPrimaryHorizontal.getStart() + scPrimaryHorizontal.getEndShift(), scPrimaryHorizontal.getEnd() -         * scPrimaryHorizontal.getStartShift() ); }         */    }