ChartReportItemImpl crii;
	private ExtendedItemHandle createStockChart( )	{		ExtendedItemHandle eih = elementFactory.newExtendedItem( null, "Chart" );//$NON-NLS-1$		try		{			eih.setHeight( "175pt" );//$NON-NLS-1$			eih.setWidth( "450pt" );//$NON-NLS-1$			eih.setProperty( ExtendedItemHandle.DATA_SET_PROP, "Data Set" );//$NON-NLS-1$			PropertyHandle computedSet = eih.getColumnBindings( );			cs1.setExpression( "dataSetRow[\"Date\"]" );//$NON-NLS-1$			computedSet.addItem( cs1 );			cs2.setExpression( "dataSetRow[\"High\"]" );//$NON-NLS-1$			computedSet.addItem( cs2 );			cs3.setExpression( "dataSetRow[\"Close\"]" );//$NON-NLS-1$			computedSet.addItem( cs3 );			cs4.setExpression( "dataSetRow[\"Low\"]" );//$NON-NLS-1$			computedSet.addItem( cs4 );			cs5.setExpression( "dataSetRow[\"Open\"]" );//$NON-NLS-1$			computedSet.addItem( cs5 );			cs6.setExpression( "dataSetRow[\"Volume\"]" );//$NON-NLS-1$			computedSet.addItem( cs6 );		}		catch ( SemanticException e )		{			e.printStackTrace( );		}		ChartWithAxes cwaStock = ChartWithAxesImpl.create( );		cwaStock.setType( "Stock Chart" );//$NON-NLS-1$		cwaStock.setSubType( "Standard Stock Chart" );//$NON-NLS-1$		cwaStock.getTitle( ).setVisible( false );		cwaStock.getLegend( ).setVisible( false );		cwaStock.setOrientation( Orientation.VERTICAL_LITERAL );		cwaStock.getBlock( ).setBounds( BoundsImpl.create( 0, 0, 450, 175 ) );		cwaStock.getPlot( ).getClientArea( ).getOutline( ).setVisible( true );		cwaStock.getPlot( ).getClientArea( ).setBackground(				ColorDefinitionImpl.create( 254, 251, 233 ) );		Axis xAxisPrimary = cwaStock.getPrimaryBaseAxes( )[0];		xAxisPrimary.setCategoryAxis( true );		xAxisPrimary.getTitle( ).getCaption( ).setValue( "Trading Date" );//$NON-NLS-1$		xAxisPrimary.getMajorGrid( ).getLineAttributes( ).setStyle(				LineStyle.DOTTED_LITERAL );		xAxisPrimary.getMajorGrid( ).getLineAttributes( ).setVisible( true );		xAxisPrimary.getMajorGrid( ).getLineAttributes( ).setColor(				ColorDefinitionImpl.GREY( ) );		xAxisPrimary.setType( AxisType.DATE_TIME_LITERAL );		xAxisPrimary.setFormatSpecifier( JavaDateFormatSpecifierImpl				.create( "MM/dd/yyyy" ) );//$NON-NLS-1$		Axis yAxisPrimary = cwaStock.getPrimaryOrthogonalAxis( xAxisPrimary );		yAxisPrimary.getTitle( ).getCaption( ).setValue( "Price" );//$NON-NLS-1$		yAxisPrimary.getMajorGrid( ).getLineAttributes( ).setStyle(				LineStyle.DOTTED_LITERAL );		yAxisPrimary.getMajorGrid( ).getLineAttributes( ).setVisible( true );		yAxisPrimary.getMajorGrid( ).getLineAttributes( ).setColor(				ColorDefinitionImpl.GREY( ) );		yAxisPrimary.getScale( ).setMin( NumberDataElementImpl.create( 2.0 ) );		yAxisPrimary.getScale( ).setMax( NumberDataElementImpl.create( 3.0 ) );		yAxisPrimary.getScale( ).setStep( 0.2 );		SampleData sd = DataFactory.eINSTANCE.createSampleData( );		BaseSampleData sdBase = DataFactory.eINSTANCE.createBaseSampleData( );		sdBase.setDataSetRepresentation( "01/25/2005" );//$NON-NLS-1$		sd.getBaseSampleData( ).add( sdBase );		OrthogonalSampleData sdOrthogonal = DataFactory.eINSTANCE				.createOrthogonalSampleData( );		sdOrthogonal.setDataSetRepresentation( "H5.3 L1.3 O4.5 C3.4" );//$NON-NLS-1$		sdOrthogonal.setSeriesDefinitionIndex( 0 );		sd.getOrthogonalSampleData( ).add( sdOrthogonal );		cwaStock.setSampleData( sd );		Series seCategory = SeriesImpl.create( );		Query query = QueryImpl.create( "row[\"Date\"]" );//$NON-NLS-1$		seCategory.getDataDefinition( ).add( query );		SeriesDefinition sdX = SeriesDefinitionImpl.create( );		sdX.getSeries( ).add( seCategory );		xAxisPrimary.getSeriesDefinitions( ).add( sdX );		StockSeries ss = (StockSeries) StockSeriesImpl.create( );		ss.setSeriesIdentifier( "Stock Price" );//$NON-NLS-1$		Query query1 = QueryImpl.create( "row[\"High\"]" );//$NON-NLS-1$		Query query2 = QueryImpl.create( "row[\"Low\"]" );//$NON-NLS-1$		Query query3 = QueryImpl.create( "row[\"Open\"]" );//$NON-NLS-1$		Query query4 = QueryImpl.create( "row[\"Close\"]" );//$NON-NLS-1$		ArrayList list = new ArrayList( );		list.add( query1 );		list.add( query2 );		list.add( query3 );		list.add( query4 );		ss.getDataDefinition( ).addAll( list );		SeriesDefinition sdY = SeriesDefinitionImpl.create( );		sdY.getSeriesPalette( ).update(				ColorDefinitionImpl.create( 168, 225, 253 ) );		yAxisPrimary.getSeriesDefinitions( ).add( sdY );		sdY.getSeries( ).add( ss );		ChartReportItemImpl crii;		try		{			// Add ChartReportItemImpl to ExtendedItemHandle			crii = (ChartReportItemImpl) eih.getReportItem( );			// Add chart instance to ChartReportItemImpl			crii.setProperty( "chart.instance", cwaStock );//$NON-NLS-1$		}		catch ( ExtendedElementException e )		{			e.printStackTrace( );		}		return eih;	}