Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357114 - Stack bar chart by y-grouping
Summary: Stack bar chart by y-grouping
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Birt-Chart-inbox@eclipse.org CLA
QA Contact: Sissi Zhu CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-08 11:51 EDT by David Paquin CLA
Modified: 2011-12-29 01:42 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Paquin CLA 2011-09-08 11:51:27 EDT
The current implementation of the bar chart allows users to create a stacked chart, where each stack is a single series. It would be useful for my application (and I would assume some others) to be able to stack each y grouping. See http://www.birt-exchange.org/org/forum/index.php/topic/23355-any-way-to-stack-by-y-series-groupings/ for a full description.
Comment 1 Xiaoying Gu CLA 2011-12-29 01:18:23 EST
This bug is fixed in the bird exchang . ---Fengfu.liu
Comment 2 Xiaoying Gu CLA 2011-12-29 01:29:15 EST
in the bird exchange,the administrator BIRT Guru provide the Solution for the issue below:
------------------------------------------------------------------------------

Try something like this to actually change the series identifier:
 
function beforeGeneration( chart, icsc ){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); var xAxis = chart.getAxes().get(0);var yAxis = xAxis.getAssociatedAxes().get(0);var xSerieDef = xAxis.getSeriesDefinitions().get(0);var numSeries = yAxis.getSeriesDefinitions().size();var i=0;while (i < numSeries){var ySerieDef = yAxis.getSeriesDefinitions().get(i);i++; ySerieDef.getSeries().get(0).setSeriesIdentifier("My Series " + i.toString());}}
 
This will change the legend in the label. The code above will change them to My Series 1, My Series 2, etc... You'll just have to replace that with your way to name them what you want. 

Hope this helps. 
-------------------------------------------------------------------------------
make the change by Fengfu.liu