barseries.setLabel( series.getLabel( ) ); if ( series.getLabelPosition( ).equals( Position.INSIDE_LITERAL ) || series.getLabelPosition( ).equals( Position.OUTSIDE_LITERAL ) ) { barseries.setLabelPosition( series.getLabelPosition( ) ); } else { barseries.setLabelPosition( Position.OUTSIDE_LITERAL ); } barseries.setVisible( series.isVisible( ) ); if ( series.eIsSet( ComponentPackage.eINSTANCE.getSeries_Triggers( ) ) ) { barseries.getTriggers( ).addAll( series.getTriggers( ) ); } if ( series.eIsSet( ComponentPackage.eINSTANCE.getSeries_DataPoint( ) ) ) { barseries.setDataPoint( series.getDataPoint( ) ); } if ( series.eIsSet( ComponentPackage.eINSTANCE.getSeries_DataDefinition( ) ) ) { barseries.getDataDefinition( ).add( series.getDataDefinition( ) .get( 0 ) ); }
ChartUIUtil.copyGeneralSeriesAttributes( series, barseries );
	private Series getConvertedSeries( Series series )	{		// Do not convert base series		if ( series.getClass( )				.getName( )				.equals( "org.eclipse.birt.chart.model.component.impl.SeriesImpl" ) ) //$NON-NLS-1$		{			return series;		}		BarSeries barseries = (BarSeries) BarSeriesImpl.create( );		barseries.setRiser( RiserType.RECTANGLE_LITERAL );		// Copy generic series properties		barseries.setLabel( series.getLabel( ) );		if ( series.getLabelPosition( ).equals( Position.INSIDE_LITERAL )				|| series.getLabelPosition( ).equals( Position.OUTSIDE_LITERAL ) )		{			barseries.setLabelPosition( series.getLabelPosition( ) );		}		else		{			barseries.setLabelPosition( Position.OUTSIDE_LITERAL );		}		barseries.setVisible( series.isVisible( ) );		if ( series.eIsSet( ComponentPackage.eINSTANCE.getSeries_Triggers( ) ) )		{			barseries.getTriggers( ).addAll( series.getTriggers( ) );		}		if ( series.eIsSet( ComponentPackage.eINSTANCE.getSeries_DataPoint( ) ) )		{			barseries.setDataPoint( series.getDataPoint( ) );		}		if ( series.eIsSet( ComponentPackage.eINSTANCE.getSeries_DataDefinition( ) ) )		{			barseries.getDataDefinition( ).add( series.getDataDefinition( )					.get( 0 ) );		}		// Copy series specific properties		if ( series instanceof LineSeries )		{			barseries.setRiserOutline( ( (LineSeries) series ).getLineAttributes( )					.getColor( ) );		}		else if ( series instanceof PieSeries )		{			barseries.setRiserOutline( ( (PieSeries) series ).getSliceOutline( ) );		}		else if ( series instanceof StockSeries )		{			barseries.setRiserOutline( ( (StockSeries) series ).getLineAttributes( )					.getColor( ) );		}		return barseries;	}