int iDirection = ( iOrientation == HORIZONTAL || bAlwaysForward ) ? FORWARD : BACKWARD;
int iDirection = ( iScaleDirection == AUTO ) ? ( ( iOrientation == HORIZONTAL ) ? FORWARD : BACKWARD ) : iScaleDirection;
	public final int computeTicks( IDisplayServer xs, Label la,			int iLabelLocation, int iOrientation, double dStart, double dEnd,			boolean bConsiderStartEndLabels, AllAxes aax )			throws ChartException	{		int nTicks = 0;		double dLength = 0;		int iDirection = ( iOrientation == HORIZONTAL || bAlwaysForward ) ? FORWARD				: BACKWARD;		DataSetIterator dsi = getData( );		if ( bConsiderStartEndLabels )		{			computeAxisStartEndShifts( xs,					la,					iOrientation,					iLabelLocation,					aax );			dStart += dStartShift * iDirection;			dEnd += dEndShift * -iDirection;		}		if ( ( iType & TEXT ) == TEXT || bCategoryScale )		{			nTicks = dsi.size( ) + 1;			dLength = Math.abs( dStart - dEnd );		}		else if ( ( iType & NUMERICAL ) == NUMERICAL )		{			nTicks = getTickCount( );			dLength = Math.abs( dStart - dEnd );		}		else if ( ( iType & DATE_TIME ) == DATE_TIME )		{			final CDateTime cdt1 = (CDateTime) oMinimum;			final CDateTime cdt2 = (CDateTime) oMaximum;			final double dNumberOfSteps = Math.ceil( CDateTime.computeDifference( cdt2,					cdt1,					asInteger( oUnit ) ) );			nTicks = (int) ( dNumberOfSteps / asInteger( oStep ) ) + 1;			dLength = Math.abs( dStart - dEnd );		}		else		{			throw new ChartException( ChartEnginePlugin.ID,					ChartException.GENERATION,					"exception.unknown.axis.type.tick.computations", //$NON-NLS-1$					ResourceBundle.getBundle( Messages.ENGINE, rtc.getLocale( ) ) );		}		final double dTickGap = dLength / ( nTicks - 1 ) * iDirection;		double d = dStart + dTickGap;		final double[] da = new double[nTicks];		for ( int i = 1; i < nTicks - 1; i++, d += dTickGap )		{			da[i] = d;		}		da[0] = dStart;		da[nTicks - 1] = dEnd;		setTickCordinates( null );		setEndPoints( dStart, dEnd );		setTickCordinates( da );		baTickLabelVisible = checkTickLabelsVisibility( xs, la, iLabelLocation );		return nTicks;	}