currentChart.setType( sType );
currentChart.setType( TYPE_LITERAL );
	private Chart getConvertedChart( Chart currentChart, String sNewSubType,			String sNewDimension )	{		Chart helperModel = (Chart) EcoreUtil.copy( currentChart );		if ( ( currentChart instanceof ChartWithAxes ) ) // Chart is		// ChartWithoutAxes		{			// Create a new instance of the correct type and set initial			// properties			currentChart = ChartWithoutAxesImpl.create( );			currentChart.setType( sType );			currentChart.setSubType( sNewSubType );			currentChart.setDimension( getDimensionFor( sNewDimension ) );			// Copy generic chart properties from the old chart			currentChart.setBlock( helperModel.getBlock( ) );			currentChart.setDescription( helperModel.getDescription( ) );			currentChart.setGridColumnCount( helperModel.getGridColumnCount( ) );			if ( !currentChart.getType( ).equals( "Line Chart" ) && !currentChart.getType( ).equals( "Bar Chart" ) ) //$NON-NLS-1$ //$NON-NLS-2$			{				currentChart.setSampleData( getConvertedSampleData( helperModel.getSampleData( ) ) );			}			currentChart.setScript( helperModel.getScript( ) );			if ( helperModel.isSetSeriesThickness( ) )			{				currentChart.setSeriesThickness( helperModel.getSeriesThickness( ) );			}			else			{				currentChart.setSeriesThickness( 15 );			}			currentChart.setUnits( helperModel.getUnits( ) );			if ( helperModel.getGridColumnCount( ) > 0 )			{				currentChart.setGridColumnCount( helperModel.getGridColumnCount( ) );			}			else			{				currentChart.setGridColumnCount( 1 );			}			// Copy series definitions from old chart			( (ChartWithoutAxes) currentChart ).getSeriesDefinitions( )					.add( ( (Axis) ( (ChartWithAxes) helperModel ).getAxes( )							.get( 0 ) ).getSeriesDefinitions( ).get( 0 ) );			Vector vOSD = new Vector( );			EList axesOrthogonal = ( (Axis) ( (ChartWithAxes) helperModel ).getAxes( )					.get( 0 ) ).getAssociatedAxes( );			for ( int i = 0; i < axesOrthogonal.size( ); i++ )			{				EList osd = ( (Axis) axesOrthogonal.get( i ) ).getSeriesDefinitions( );				for ( int j = 0; j < osd.size( ); j++ )				{					SeriesDefinition sd = (SeriesDefinition) osd.get( j );					Series series = sd.getDesignTimeSeries( );					sd.getSeries( ).clear( );					sd.getSeries( ).add( getConvertedSeries( series ) );					vOSD.add( sd );				}			}			( (SeriesDefinition) ( (ChartWithoutAxes) currentChart ).getSeriesDefinitions( )					.get( 0 ) ).getSeriesDefinitions( ).clear( );			( (SeriesDefinition) ( (ChartWithoutAxes) currentChart ).getSeriesDefinitions( )					.get( 0 ) ).getSeriesDefinitions( ).addAll( vOSD );			// Set the legend item type t Categories to have the chart behave as			// expected by default.			currentChart.getLegend( )					.setItemType( LegendItemType.CATEGORIES_LITERAL );		}		else if ( currentChart.getType( ).equals( sType ) )		{			currentChart.setSubType( sNewSubType );			if ( !currentChart.isSetSeriesThickness( ) )			{				currentChart.setSeriesThickness( 15 );			}			if ( !currentChart.getDimension( )					.equals( getDimensionFor( sNewDimension ) ) )			{				currentChart.setDimension( getDimensionFor( sNewDimension ) );			}		}		else		{			return null;		}		return currentChart;	}