final SeriesDefinition sdBase = (SeriesDefinition) elBase.get( 0 );
	public static final BaseRenderer[] instances( Chart cm, RunTimeContext rtc,			Object oComputations ) throws ChartException	{		final PluginSettings ps = PluginSettings.instance( );		BaseRenderer[] brna = null;		final boolean bPaletteByCategory = ( cm.getLegend( )				.getItemType( )				.getValue( ) == LegendItemType.CATEGORIES );		if ( cm instanceof ChartWithAxes )		{			final ChartWithAxes cwa = (ChartWithAxes) cm;			final Axis[] axa = cwa.getPrimaryBaseAxes( );			Axis axPrimaryBase = axa[0];			Series se;			AxesRenderer ar = null;			ArrayList al = new ArrayList( ), alRunTimeSeries;			EList elBase, elOrthogonal;			SeriesDefinition sd = null;			// final int iSeriesCount =			// ((ChartWithAxes)cm).getSeries(IConstants.ORTHOGONAL).length;			int iSI = 0; // SERIES INDEX COUNTER			elBase = axPrimaryBase.getSeriesDefinitions( );			if ( elBase.isEmpty( ) ) // NO SERIES DEFINITIONS			{				return createEmptyInstance( cm, rtc, oComputations );			}			else			{				final SeriesDefinition sdBase = (SeriesDefinition) elBase.get( 0 ); // ONLY				// 1				// SERIES				// DEFINITION				// MAY				// BE				// ASSOCIATED				// WITH THE BASE AXIS				alRunTimeSeries = sdBase.getRunTimeSeries( );				if ( alRunTimeSeries.isEmpty( ) )				{					return createEmptyInstance( cm, rtc, oComputations );				}				se = (Series) alRunTimeSeries.get( 0 ); // ONLY 1 SERIES MAY BE				// ASSOCIATED WITH THE				// BASE SERIES				// DEFINITION				ar = ( se.getClass( ) == SeriesImpl.class ) ? new EmptyWithAxes( )						: (AxesRenderer) ps.getRenderer( se.getClass( ) );				ar.set( cm, oComputations, se, axPrimaryBase, sdBase ); // INITIALIZE				// THE				// RENDERER				ar.set( rtc );				ar.iSeriesIndex = iSI++;				al.add( ar );				final Axis[] axaOrthogonal = cwa.getOrthogonalAxes( axPrimaryBase,						true );				for ( int i = 0; i < axaOrthogonal.length; i++ )				{					elOrthogonal = axaOrthogonal[i].getSeriesDefinitions( );					for ( int j = 0; j < elOrthogonal.size( ); j++ )					{						sd = (SeriesDefinition) elOrthogonal.get( j );						alRunTimeSeries = sd.getRunTimeSeries( );						for ( int k = 0; k < alRunTimeSeries.size( ); k++ )						{							se = (Series) alRunTimeSeries.get( k );							ar = ( se.getClass( ) == SeriesImpl.class ) ? new EmptyWithAxes( )									: (AxesRenderer) ps.getRenderer( se.getClass( ) );							ar.set( cm,									oComputations,									se,									axaOrthogonal[i],									bPaletteByCategory ? sdBase : sd ); // INITIALIZE							// THE							// RENDERER							ar.iSeriesIndex = iSI++;							al.add( ar );						}					}				}				// CONVERT INTO AN ARRAY AS REQUESTED				brna = new BaseRenderer[iSI];				for ( int i = 0; i < iSI; i++ )				{					ar = (AxesRenderer) al.get( i );					ar.iSeriesCount = iSI;					brna[i] = ar;				}			}		}		else if ( cm instanceof ChartWithoutAxes )		{			final ChartWithoutAxes cwoa = (ChartWithoutAxes) cm;			EList elBase = cwoa.getSeriesDefinitions( );			EList elOrthogonal;			SeriesDefinition sd, sdBase;			ArrayList alRuntimeSeries;			final Series[] sea = cwoa.getRunTimeSeries( );			Series se;			final int iSeriesCount = sea.length;			brna = new BaseRenderer[iSeriesCount];			int iSI = 0; // SERIES INDEX COUNTER			for ( int i = 0; i < elBase.size( ); i++ )			{				sdBase = (SeriesDefinition) elBase.get( i );				alRuntimeSeries = sdBase.getRunTimeSeries( );				if ( alRuntimeSeries.size( ) != 1 ) // CHECK FOR A SINGLE BASE				// SERIES ONLY				{					throw new ChartException( ChartEnginePlugin.ID,							ChartException.PLUGIN,							"exception.illegal.base.runtime.series.count", //$NON-NLS-1$							new Object[]{								new Integer( alRuntimeSeries.size( ) )							},							ResourceBundle.getBundle( Messages.ENGINE,									rtc.getLocale( ) ) );				}				se = (Series) alRuntimeSeries.get( 0 );				brna[iSI] = ( se.getClass( ) == SeriesImpl.class ) ? new EmptyWithoutAxes( )						: ps.getRenderer( se.getClass( ) );				brna[iSI].set( cm, oComputations, se, null, sdBase ); // INITIALIZE				// THE				// RENDERER				brna[iSI].set( rtc );				brna[iSI].iSeriesIndex = iSI++;				elOrthogonal = ( (SeriesDefinition) elBase.get( i ) ).getSeriesDefinitions( );				for ( int j = 0; j < elOrthogonal.size( ); j++ )				{					sd = (SeriesDefinition) elOrthogonal.get( j );					alRuntimeSeries = sd.getRunTimeSeries( );					for ( int k = 0; k < alRuntimeSeries.size( ); k++ )					{						se = (Series) alRuntimeSeries.get( k );						brna[iSI] = ( se.getClass( ) == SeriesImpl.class ) ? new EmptyWithoutAxes( )								: ps.getRenderer( se.getClass( ) );						brna[iSI].set( cm,								oComputations,								se,								null,								bPaletteByCategory ? sdBase : sd ); // INITIALIZE						// THE						// RENDERER						brna[iSI].iSeriesIndex = iSI++;					}				}			}			for ( int k = 0; k < iSI; k++ )			{				brna[k].iSeriesCount = iSI;			}		}		return brna;	}