Dynamic highlighting in BIRT chart
Hello again,<br />
<br />
in my current project I'm having a chart that shows a YTD yield (line series) and the current yield (bar series). Besides this there is a baseline (line series) and a goal (line series). I added a picture to show what I've done so far.<br />
So far so well. Now to visualize the data a bit more I want to highlight the current yield bars according to their value.<br />
If the value is below the baseline it should be red, between baseline and goal it should be orange and above the goal it should be green.<br />
<br />
I looked at <a class='bbc_url' href='http://www.birt-exchange.org/org/devshare/designing-birt-reports/401-highlighting-the-top-n-bars-in-a-birt-bar-chart/'>this</a> BIRT example and tried to change it accordingly to my needs.<br />
But because I don't know how many values should be what color it doesn't work this way I think <br />
<br />
Has anyone another idea how to do it?<br />
<br />
Thank you very much,<br />
JRS
<br />
in my current project I'm having a chart that shows a YTD yield (line series) and the current yield (bar series). Besides this there is a baseline (line series) and a goal (line series). I added a picture to show what I've done so far.<br />
So far so well. Now to visualize the data a bit more I want to highlight the current yield bars according to their value.<br />
If the value is below the baseline it should be red, between baseline and goal it should be orange and above the goal it should be green.<br />
<br />
I looked at <a class='bbc_url' href='http://www.birt-exchange.org/org/devshare/designing-birt-reports/401-highlighting-the-top-n-bars-in-a-birt-bar-chart/'>this</a> BIRT example and tried to change it accordingly to my needs.<br />
But because I don't know how many values should be what color it doesn't work this way I think <br />
<br />
Has anyone another idea how to do it?<br />
<br />
Thank you very much,<br />
JRS
0
Comments
-
Hi JRS,
Your baseline and goal values are set, so since you know these, you'd just need to grab the orthogonal series of the bar series using dph.getOrthogonalValue() and compare it to these values and use fill.set( R,G,B ) inside the beforeDrawDataPoint() function. Let me know if you have questions.Warning No formatter is installed for the format ipb0 -
Hi mwilliams,
thanks for the reply. Finally I did it I have been thinking a bit in the wrong direction. I tried to catch all values in an array and test every orthogonal value.
Now instead of the arrays I just have two local variables and it works perfectly. Thank you very much.
Can I set the alpha value with this method, too?
Regards,
JRS0 -
Hi,
I want to set the transparency of the bars, too. This would make it even nicer to visualize because I have a line series there an this is drawn first, so the bars lie above it.
In fact I want the bars to be 'translucent' or what is it called in BIRT?
Regards,
JRS0 -
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="68662" data-time="1285157905" data-date="22 September 2010 - 05:18 AM"><p>
JRS,<br />
<br />
If setting in the designer, you can just open the chart editor, go to the format chart tab, go to the series section, and then select the check box for "translucent" next to the bar series.<br /></p></blockquote>
<br />
Hi mwilliams,<br />
<br />
yeah I know... But if I reset the colors as described above the translucent bars are not translucent anymore. So I asked myself if there is anything like:<br />
<br />
fill(R,G,B,a) where you can set the alpha value as well.<br />
<br />
Thanks,<br />
JRS0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 156 General Questions
- 152 Thrust Services
- 56 Developer Hackathon
- 38 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9.1K Extended ECM
- 919 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 34 eDOCS
- 193 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 10 XM Fax
- Follow Categories