Enabling study layout in JavaScript generated axes [message #709023] |
Wed, 03 August 2011 08:09  |
Eclipse User |
|
|
|
My report has a set of line charts, each of which needs to be annotated with additional series that are created based on the parameter selection. The logic behind it is currently residing in beforeFactory() and dataset's onFetch() method. Rather than just adding the new line series to the main section of the chart, I want to create an additional Y-axis with study layout (as introduced in BIRT 2.5) and add my new line series to it. This is the shortened version of the code:
cht = reportContext.getDesignHandle().findElement("All criteria chart");
mychart = cht.getReportItem().getProperty( "chart.instance" );
xAxis =mychart.getAxes().get(0);
yAxis1 = xAxis.getAssociatedAxes().get(0);
yAxis2 = AxisImpl.create( Axis.ORTHOGONAL );
xAxis.getAssociatedAxes( ).add( yAxis2 );
//mychart.setStudyLayout(true);
//create new line series here...
This works and adds the new line series, but as soon as I set the Study Layout, the axis labels and markers for existing axes (xAxis and yAxis1) dissappear!
Any idea what is going wrong?
|
|
|
|
|
|
Re: Enabling study layout in JavaScript generated axes [message #709263 is a reply to message #709200] |
Wed, 03 August 2011 13:57  |
Eclipse User |
|
|
|
I am using normal grouping on X-axis.
When I add a second axis using the Designer (using different data for the second series, but same starting chart), the behaviour is exactly the same, e.g. it appears normal when study view is deselected, but as soon as I switch it on the labels disappear from the X-axis and the original Y-axis.
|
|
|
Powered by
FUDForum. Page generated in 0.03990 seconds