newPrimaryAxis = getAxisYForProcessing( (ChartWithAxes) chartModel, axisIndex + 1 );
Axis oldPrimaryAxis = getAxisYForProcessing( (ChartWithAxes) chartModel, axisIndex ); if ( oldPrimaryAxis.isPrimaryAxis( ) ) { int yAxisSize = getOrthogonalAxisNumber( chartModel ); Axis newPrimaryAxis = null; if ( axisIndex + 1 < yAxisSize ) { newPrimaryAxis = getAxisYForProcessing( (ChartWithAxes) chartModel, axisIndex + 1 ); } else { newPrimaryAxis = getAxisYForProcessing( (ChartWithAxes) chartModel, 0 ); }  newPrimaryAxis.setPrimaryAxis( true ); newPrimaryAxis.setOrigin( oldPrimaryAxis.getOrigin( ) ); newPrimaryAxis.setLabelPosition( oldPrimaryAxis.getLabelPosition( ) ); newPrimaryAxis.setTitlePosition( oldPrimaryAxis.getTitlePosition( ) ); } return null;
	public static void removeAxis( Chart chartModel, int axisIndex )	{		if ( chartModel instanceof ChartWithoutAxes )		{			return;		}		// Ensure one primary axis existent		boolean isNotificaionIgnored = ChartAdapter.isNotificationIgnored( );		ChartAdapter.ignoreNotifications( true );		Axis oldPrimaryAxis = getAxisYForProcessing( (ChartWithAxes) chartModel,				axisIndex );		if ( oldPrimaryAxis.isPrimaryAxis( ) )		{			int yAxisSize = getOrthogonalAxisNumber( chartModel );			Axis newPrimaryAxis = null;			if ( axisIndex + 1 < yAxisSize )			{				newPrimaryAxis = getAxisYForProcessing( (ChartWithAxes) chartModel,						axisIndex + 1 );			}			else			{				newPrimaryAxis = getAxisYForProcessing( (ChartWithAxes) chartModel,						0 );			}			// Retain the properties of primary axis			newPrimaryAxis.setPrimaryAxis( true );			newPrimaryAxis.setOrigin( oldPrimaryAxis.getOrigin( ) );			newPrimaryAxis.setLabelPosition( oldPrimaryAxis.getLabelPosition( ) );			newPrimaryAxis.setTitlePosition( oldPrimaryAxis.getTitlePosition( ) );		}		ChartAdapter.ignoreNotifications( isNotificaionIgnored );		// Remove the orthogonal axis		getAxisXForProcessing( (ChartWithAxes) chartModel ).getAssociatedAxes( )				.remove( axisIndex );		// Remove the sample data of the axis		// int iSDIndexFirst = getLastSeriesIndexWithinAxis( chartModel,		// axisIndex - 1 ) + 1;		// int iSDIndexLast = getLastSeriesIndexWithinAxis( chartModel,		// axisIndex );		// EList list = chartModel.getSampleData( ).getOrthogonalSampleData( );		// for ( int i = 0; i < list.size( ); i++ )		// {		// if ( i >= iSDIndexFirst && i <= iSDIndexLast )		// {		// list.remove( i );		// i--;		// iSDIndexLast--;		// }		// }	}