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)
Charting aggregate data with optional y-axis grouping
acsteele
<p>Hello all,</p><p> </p><p>I have a series of tuples containing {date,id,rank} data.
I would like to represent these as a stacked bar chart with date as category and a count of unique ids in a period as the value axis.
However, I would also like to be able to apply an optional value grouping with rank intervals e.g. 1-5, 6-10 etc. and base this grouping on the LAST rank in the period for a given id.
The attached rptdesign has some sample data and an example of the chart I'm aiming for. I'm using BIRT 4.3.1
With no optional grouping the chart works fine and displays the correct values. Unfortunately, when I apply the optional grouping using an expression like</p><p> </p><p>rank=row["rank"];
if (!rank || 0 == rank.length){
"Not Ranked";
} else if (rank >= 1 && rank <= 5) {
" 1-5";
} else if (rank >= 6 && rank <= 10) {
" 6-10";
} else if (rank >= 11 && rank <= 20) {
"11-20";
} else if (rank >= 21 && rank <= 30) {
"21-30";
} else {
"30+"
};</p><p> </p><p>The counts are wrong as each rank value in the period is being taken into account, not just the last one.
There are tables below the chart that correctly show the data.
</p><p>I've tried a variety of methods to try and get these data to display correctly in the chart but am now running out of ideas and would be grateful for any help that anyone can provide.</p><p> </p><p>Thanks.</p><p> </p><p>Andy</p>
Find more posts tagged with
Comments
There are no comments yet