Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Creating a Stacked Bar chart using a script
Creating a Stacked Bar chart using a script [message #1053496] Mon, 06 May 2013 09:43 Go to next message
Shlomi Lanton is currently offline Shlomi LantonFriend
Messages: 7
Registered: May 2013
Junior Member
*Sorry for the bubble posting, I hope that is the right forum now*

Hi all,

I'm trying to create a dynamic Stacked Bar chart.
I have found an example that shows how to create a simple bar chart using a script in the "beforeFactory",
but I can't figure out how make it display as a stacked bar.
meaning which part of the Birt API is controlling that "Optional Y Series Grouping" setting.

I have attached a sample report.
When you view it in HTML you see 3 parts:
1. a table that displays all the data that I got in the dataset
2. a Stacked bar chart that I created using Birt eclipse and the dataset from item 1 (hard coded), this chart is using the "PRODUCTCODE" column as the "Optional Y Series Grouping" to group the data.
3. a bar chart that I create dynamically using the dataset from item 1.

comment: This is not a real-life example just a sample report that I created as a test.

What I'm trying to do, is to create exactly the same chart as in item 2 but dynamically. The problem is that I cannot find neither an example nor the API calls to set the "Optional Y Series Grouping" of that chart.

Your help will be greatly appreciated,

Re: Creating a Stacked Bar chart using a script [message #1053852 is a reply to message #1053496] Tue, 07 May 2013 21:26 Go to previous message
Kristopher Clark is currently offline Kristopher ClarkFriend
Messages: 130
Registered: January 2013
Senior Member
I looks like the setGrouping() method is what you'll want to use for the optional y series grouping. I put a link to the Chart API's in your other post. Let me know if this helps.
Previous Topic:report viewer - https termination / resource loading issue
Next Topic:Adding sort to Property Editor
Goto Forum:

Current Time: Wed Jul 24 00:14:24 GMT 2024

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

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

Back to the top