Axis xAxis = ( (Axis) ( (ChartWithAxes) chart ).getAxes( ).get( 0 ) ); int iYAxes = xAxis.getAssociatedAxes( ).size( );  for ( int i = 0; i < iYAxes; i++ )
orthogonalSeries = ( (SeriesDefinition) orgSdList.get( i ) ).getDesignTimeSeries( ); if ( orthogonalSeries == null )
	private SampleData updateSampleData( SampleData sdOld )	{		SampleData sdNew = DataFactory.eINSTANCE.createSampleData( );		Chart chart = getChartModel( );		// CREATE BaseSampleData		Series baseSeries = null;		if ( chart instanceof ChartWithAxes )		{			baseSeries = ( (SeriesDefinition) ( (Axis) ( (ChartWithAxes) chart ).getAxes( )					.get( 0 ) ).getSeriesDefinitions( ).get( 0 ) ).getDesignTimeSeries( );		}		else		{			baseSeries = ( (SeriesDefinition) ( (ChartWithoutAxes) chart ).getSeriesDefinitions( )					.get( 0 ) ).getDesignTimeSeries( );		}		if ( baseSeries == null )		{			throw new IllegalStateException( "Chart does not have a Base Series!" ); //$NON-NLS-1$		}		String sBaseData = ""; //$NON-NLS-1$		try		{			sBaseData = getDataForSeries( baseSeries );			BaseSampleData bsd = DataFactory.eINSTANCE.createBaseSampleData( );			bsd.setDataSetRepresentation( sBaseData );			sdNew.getBaseSampleData( ).add( bsd );		}		catch ( ChartException e )		{			container.displayException( e );			return sdOld;		}		// CREATE OrthogonalSampleData		Series orthogonalSeries = null;		if ( chart instanceof ChartWithAxes )		{			Axis xAxis = ( (Axis) ( (ChartWithAxes) chart ).getAxes( ).get( 0 ) );			int iYAxes = xAxis.getAssociatedAxes( ).size( );			// FOR EACH Y AXIS			for ( int i = 0; i < iYAxes; i++ )			{				Axis yAxis = (Axis) xAxis.getAssociatedAxes( ).get( i );				int iYSeries = yAxis.getSeriesDefinitions( ).size( );				// FOR EACH SERIES				for ( int iS = 0; iS < iYSeries; iS++ )				{					orthogonalSeries = ( (SeriesDefinition) yAxis.getSeriesDefinitions( )							.get( iS ) ).getDesignTimeSeries( );					if ( iS == 0 && orthogonalSeries == null )					{						throw new IllegalStateException( "Chart does not have an Orthogonal Series!" ); //$NON-NLS-1$					}					String sOrthogonalData = ""; //$NON-NLS-1$					try					{						sOrthogonalData = getDataForSeries( orthogonalSeries );						OrthogonalSampleData osd = DataFactory.eINSTANCE.createOrthogonalSampleData( );						osd.setDataSetRepresentation( sOrthogonalData );						osd.setSeriesDefinitionIndex( iS );						osd.eAdapters( ).addAll( sdOld.eAdapters( ) );						sdNew.getOrthogonalSampleData( ).add( osd );					}					catch ( ChartException e )					{						container.displayException( e );						return sdOld;					}				}			}		}		else		{			orthogonalSeries = ( (SeriesDefinition) ( (ChartWithoutAxes) chart ).getSeriesDefinitions( )					.get( 0 ) ).getDesignTimeSeries( );		}		// CREATE AncillarySampleData		// ADD ADAPTERS		// SET SampleData INTO MODEL		return sdNew;	}