Hi all,
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.
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 }
);
// 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;
}
}
As you can see on this screenshot , these bars partly obscure and come in front of the Stock figures.
How do I force the StockSeries to come to the front? (I use Eclipse 3.3 and BIRT 2.2.1)
Thanks in advance, Jeroen