);
if ( ( sc.getType( ) & DATE_TIME ) == DATE_TIME ) { CDateTime cdtValue = asDateTime( iv.getValue( ) ); CDateTime cdt = asDateTime( sc.getMinimum( ) ), cdtPrev = null; int iUnit = asInteger( sc.getUnit( ) ); int iStep = asInteger( sc.getStep( ) );  for ( int i = 0; i < da.length; i++ ) { if ( cdt.after( cdtValue ) ) { if ( cdtPrev == null ) { return da[i]; }   long l1 = cdtPrev.getTimeInMillis( ); long l2 = cdt.getTimeInMillis( ); long l = cdtValue.getTimeInMillis( ); double dUnitSize = da[i] - da[i - 1];  double dOffset = ( dUnitSize / ( l2 - l1 ) ) * ( l - l1 ); return da[i - 1] + dOffset;  } cdtPrev = cdt; cdt = cdt.forward( iUnit, iStep ); } return da[da.length - 1];
	public static final double getLocation( AutoScale sc, Object oValue )			throws ChartException, IllegalArgumentException	{		if ( oValue == null )		{			throw new IllegalArgumentException( MessageFormat.format( ResourceBundle.getBundle( Messages.ENGINE,					sc.getRunTimeContext( ).getLocale( ) )					.getString( "exception.scale.null.location" ), //$NON-NLS-1$					new Object[]{						sc					} )			);		}		if ( oValue instanceof Double )		{			return getLocation( sc, ( (Double) oValue ).doubleValue( ) );		}		else if ( oValue instanceof Calendar )		{			return getDateLocation( sc, new CDateTime( (Calendar) oValue ) );		}		else if ( oValue instanceof NumberDataElement )		{			return getLocation( sc, ( (NumberDataElement) oValue ).getValue( ) );		}		else if ( oValue instanceof DateTimeDataElement )		{			return getDateLocation( sc,					( (DateTimeDataElement) oValue ).getValueAsCDateTime( ) );		}		/*		 * DefaultLoggerImpl.instance().log(ILogger.WARNING, "Unexpected data		 * type {0}[value={1}] specified" + oValue.getClass().getName() + oValue );		 */// i18n_CONCATENATIONS_REMOVED		return sc.getStart( ); // RETURNS THE START EDGE OF THE SCALE	}