Bug 212371 [Regression] Auto-scale does not work correctly and gridline is not shown anymore when run the attached java file [13]
chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/computation/withaxes/AutoScale.java
}
				if ( oMaximum == null && origin.after( oMaxValue ) )
				{
					oMaximum = axisOrigin.getValue( );
				}
			}
			int iUnit;
			if ( oStep != null || oStepNumber != null )
			{
				iUnit = ChartUtil.convertUnitTypeToCalendarConstant( scModel.getUnit( ) );
			}
			else
			{
				iUnit = CDateTime.getPreferredUnit( (CDateTime) oMinValue,
						(CDateTime) oMaxValue );
			}
			
			if ( iUnit == 0 )
				iUnit = CDateTime.SECOND;
			CDateTime cdtMinAxis = ( (CDateTime) oMinValue ).backward( iUnit, 1 );
			CDateTime cdtMaxAxis = ( (CDateTime) oMaxValue ).forward( iUnit, 1 );
			cdtMinAxis.clearBelow( iUnit );
			cdtMaxAxis.clearBelow( iUnit );
			sc = new AutoScale( DATE_TIME, cdtMinAxis, cdtMaxAxis );
			sc.oStep = new Integer( 1 );
			sc.oStepNumber = oStepNumber;
			sc.oUnit = new Integer( iUnit );
			sc.setDirection( direction );
			sc.fs = fs; 
			sc.rtc = rtc;