Skip to main content



      Home
Home » Archived » BIRT » BIRT Report Designer: Setting color of bars in a bar chart by using a specific value
BIRT Report Designer: Setting color of bars in a bar chart by using a specific value [message #1594895] Sat, 31 January 2015 11:18 Go to next message
Eclipse UserFriend
Hi all

I have a table like:

Category_X, Group_X, Value_Y
A, G1, 1.234
B, G1, 65.666
C, G2, 54.78
D, G2, 45.67
E, G3, 12.43
.....

I have already generated a bar chart with BIRT Report Designer that uses Category_X for the x axis und Value_Y for the y axis. What is missing is the following:

I want to color the bar based on the Group_X value. In pseudo code:
if group = G1 then color_of_bar = red,
if group = G2 then color_of_bar = blue,
....

Can anyone help how the insert that into my report generated in Report Designer? Is it a line of code that I can enter at a "specific position"?

Best, Frank
Re: BIRT Report Designer: Setting color of bars in a bar chart by using a specific value [message #1601294 is a reply to message #1594895] Wed, 04 February 2015 16:34 Go to previous message
Eclipse UserFriend
Here is one way. In the data set onFetch script, set a Persistent Global Variable named after the category field with a value of the group field. In the chart script, access this PGV and compare it to the category value to determine the color you should shade the bar. You'll just need to create an external legend for the chart so your users know what the colors mean.
Previous Topic:Need help on BIRT app viewer
Next Topic:Difference in PDF output
Goto Forum:
  


Current Time: Fri Mar 21 14:24:03 EDT 2025

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

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

Back to the top