Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Optional Y Series Grouping
Optional Y Series Grouping [message #558391] Sun, 12 September 2010 08:10 Go to next message
No real name is currently offline No real name
Messages: 4
Registered: September 2010
Junior Member
Hi,

I created a chart with one x-axis, two y-axis and one optional Y series grouping in chart editor. All shows fine.
Now i want to use script for building my second series, because i want to add it dynamically.

My problem is, i don`t know how to do it when i use the optional y series grouping. In my Legend, there are missing the names.

Thanks for help.

Thats my implementation in beforeFactory:

importPackage(Packages.java.util);

importPackage(Packages.org.eclipse.birt.chart.model.data.impl);
importPackage(Packages.org.eclipse.birt.chart.model.component.impl);
importPackage(Packages.org.eclipse.birt.chart.model.type.impl);
importPackage(Packages.org.eclipse.birt.chart.model.attribute);
importPackage(Packages.org.eclipse.birt.chart.model.attribute.impl);
importPackage(Packages.org.eclipse.birt.chart.model.impl);
importPackage(Packages.org.eclipse.birt.chart.model.component);

cht = reportContext.getDesignHandle().findElement("MyChart");
mychart = cht.getReportItem().getProperty("chart.instance");

xAxis = mychart.getAxes().get(0);

yAxis = xAxis.getAssociatedAxes().get(0);

for(i=2; i<3; i++) {

        var sdNew = SeriesDefinitionImpl.create();
        
        var ls = LineSeriesImpl.create();
        
        var qry = QueryImpl.create("row[\"CUSTOMERNUMBER\"]");
        
        ls.getDataDefinition().add(qry);
        ls.getLineAttributes().setColor(ColorDefinitionImpl.BLACK());
        ls.getMarkers().clear();
        
        sdNew.getSeries().add(ls);
        
        
        yAxis.getSeriesDefinitions().add(sdNew);
}



I have another question to thir forum. How can i insert screenshots? Is it possible?

Thanks
Re: Optional Y Series Grouping [message #558638 is a reply to message #558391] Mon, 13 September 2010 18:22 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Are you using the sample db for this? If so can you post the whole
report? Just select the xml view and post the xml.

If you are using the web interface at www.eclipse.org/forums there is an
icon in the editor to add an image.

Jason

On 9/12/2010 4:10 AM, paulina.bastek@gmail.com wrote:
> Hi,
>
> I created a chart with one x-axis, two y-axis and one optional Y series
> grouping in chart editor. All shows fine.
> Now i want to use script for building my second series, because i want
> to add it dynamically.
>
> My problem is, i don`t know how to do it when i use the optional y
> series grouping. In my Legend, there are missing the names.
>
> Thanks for help.
>
> Thats my implementation in beforeFactory:
>
>
> importPackage(Packages.java.util);
>
> importPackage(Packages.org.eclipse.birt.chart.model.data.imp l);
> importPackage(Packages.org.eclipse.birt.chart.model.componen t.impl);
> importPackage(Packages.org.eclipse.birt.chart.model.type.imp l);
> importPackage(Packages.org.eclipse.birt.chart.model.attribut e);
> importPackage(Packages.org.eclipse.birt.chart.model.attribut e.impl);
> importPackage(Packages.org.eclipse.birt.chart.model.impl);
> importPackage(Packages.org.eclipse.birt.chart.model.componen t);
>
> cht = reportContext.getDesignHandle().findElement("MyChart");
> mychart = cht.getReportItem().getProperty("chart.instance");
>
> xAxis = mychart.getAxes().get(0);
>
> yAxis = xAxis.getAssociatedAxes().get(0);
>
> for(i=2; i<3; i++) {
>
> var sdNew = SeriesDefinitionImpl.create();
> var ls = LineSeriesImpl.create();
> var qry = QueryImpl.create("row[\"CUSTOMERNUMBER\"]");
> ls.getDataDefinition().add(qry);
> ls.getLineAttributes().setColor(ColorDefinitionImpl.BLACK()) ;
> ls.getMarkers().clear();
> sdNew.getSeries().add(ls);
> yAxis.getSeriesDefinitions().add(sdNew);
> }
>
>
>
> I have another question to thir forum. How can i insert screenshots? Is
> it possible?
>
> Thanks
Previous Topic:Yellowfin releases fact sheet on In-memory analysis
Next Topic:Format date parameter for SQL query
Goto Forum:
  


Current Time: Fri Sep 19 04:01:50 GMT 2014

Powered by FUDForum. Page generated in 0.01655 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software