Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
percentages in bar chart
jfr
Hey all
I am a NB to BIRT and have a question about how the best method is to add percentages on a bar chart.
Problem : I have a stacked bar chart with values per month
2011, November |
x1
|
y1
|
2011, December |--x2--|
y2
|
In place of displaying labels as x1 and y1, I would like to display : x1 / ( x1 + y1), y1 / (x1 + y1), ...
I'm aware of "Percentile Value Data" in "Series Labels" but it computes percentages per serie not "per line".
Any idea ?
Birt 3.7.1
Find more posts tagged with
Comments
mwilliams
Is a stacked percentage chart not something that will work for you? Let me know.
jfr
<p>Hi,</p><p> </p><p>I'm back with with my problem.</p><p> </p><p>And yes, stacked percentage chart is something that work in many cases.</p><p> </p><p>But, is it possible to get percentages "per line" and not per serie ?</p><p> </p><p>I tried to use the beforeDrawDataPointLabel function but without sucess since I don't understand how to get all the values for a given line and then the sum to get the percentage.</p><p> </p><p>Thx for the help.</p>
mwilliams
<p>You can grab all the values in afterDataSetFilled or in the beforeGeneration and use the values to compute your label values. If you create a sample report using the sample database or another way that I can run the report, I can try to help you modify the design to get what you're wanting.</p>
jfr
<p>Ok, thx very much for the help.</p><p> </p><p>I did use afterDataSetFilled and now display percentages 'per line' as wanted.</p><p> </p><p>jfr</p>
mwilliams
Great to hear! Let us know whenever you have questions!