Chart resize ? [message #152370] |
Mon, 10 April 2006 16:02 |
Eclipse User |
|
|
|
Hi to all,
I'm using BIRT 2.0.1.
I've a chart in my rpt design and I would like to resize it before it
appears.
I've a Java class for generate the report in which I'm using the
following code:
GridHandle grid = (GridHandle) design.getBody().get(0);
RowHandle row = (RowHandle) grid.getRows().get(rowChartIndex);
ExtendedItemHandle extendedItem =
(ExtendedItemHandle)((CellHandle)(row.getCells().get(0))).ge tContent().get(0);
ChartReportItemImpl chartItem
=(ChartReportItemImpl)(extendedItem.getReportItem());
Chart paretoChart = (Chart)chartItem.getProperty("chart.instance");
// set the new bounds
double chartHeight = 100 + populationSize*8;
paretoChart.getBlock().setBounds(BoundsImpl.create(0, 0, 600,chartHeight));
This code works fine with BIRT 1 but with BIRT 2 I've a
ArrayIndexOfBounds Exception under design.getBody().get(0) instruction.
Have you got any ideas ?
Thansk a lot for your help
Dov
|
|
|
Powered by
FUDForum. Page generated in 0.02480 seconds