Hi all,<br />
<br />
Consider the below source code where I create a combination chart with a BarSeries and a StockSeries. The StockSeries generates three identical Candle-stick Stock figures with a box from values 12 to 14 and low and high values 10 and 16. The BarSeries generate three bar figures with heights 11, 13 and 15. As you can see on <a class='bbc_url' href='
http://picasaweb.google.com/lh/photo/FYi4VHCg1POUrMHeP542JA'>this screenshot </a>, these bars partly obscure and come in front of the Stock figures.<br />
<br />
How do I force the StockSeries to come to the front?<br />
(I use Eclipse 3.3 and BIRT 2.2.1)<br />
<br />
Thanks in advance,<br />
Jeroen<br />
<br />
<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
public class StockBarCombination
{
public final static Chart createStockBarCombination( )
{
ChartWithAxes cwaStockBar = ChartWithAxesImpl.create( );
// Legend
cwaStockBar.getLegend( ).setVisible( false );
// X-Axis
Axis xAxisPrimary = ( (ChartWithAxesImpl) cwaStockBar ).getPrimaryBaseAxes( )[0];
// Y-Axis
Axis yAxisPrimary = ( (ChartWithAxesImpl) cwaStockBar ).getPrimaryOrthogonalAxis( xAxisPrimary );
// Data Set
TextDataSet categoryValues = TextDataSetImpl.create(
new String[] { "One", "Two", "Three" }
);
StockDataSet dsStockValues = StockDataSetImpl
.create(new StockEntry[] {
new StockEntry(12, 10, 16, 14),
new StockEntry(12, 10, 16, 14),
new StockEntry(12, 10, 16, 14) });
NumberDataSet dsBarValues = NumberDataSetImpl.create(
new double[] { 11, 13, 15 }
);
// Create X-Series
Series seBase = SeriesImpl.create( );
seBase.setDataSet( categoryValues );
SeriesDefinition sdX = SeriesDefinitionImpl.create( );
xAxisPrimary.getSeriesDefinitions( ).add( sdX );
sdX.getSeries( ).add( seBase );
// Y-BarSeries
BarSeries bs = (BarSeries) BarSeriesImpl.create();
bs.setDataSet(dsBarValues);
// Y-StockSeries
StockSeries ss = (StockSeries) StockSeriesImpl.create( );
ss.getLineAttributes().setColor(ColorDefinitionImpl.BLUE());
ss.setDataSet( dsStockValues );
SeriesDefinition sdY = SeriesDefinitionImpl.create( );
yAxisPrimary.getSeriesDefinitions( ).add( sdY );
sdY.getSeries( ).add( bs );
sdY.getSeries( ).add( ss );
return cwaStockBar;
}
}
</pre>