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)
Hide from legend and graph
Arif shah
<div>I have a birt combination chart. On x axis, I have crime type, on y axis I have crime count. On Legend, I have Towns.
Lets suppose I have five towns, A, B, C D and mytown. I want to compare the crimes of mytown to the crimes of rest of towns. I want to represent the crimes of mytown by a bar graph and Crimes of town A, B, C and D by a line graph
What I did was create a combination graph with two y axis. On one axis, I only am counting the crimes of mytown
<pre class="_prettyXprint">if(row["Towns"] == 'Mytown')(row["Crime Count"])</pre>
On second y axis, I have plotted the crimes of only A, B and C
<pre class="_prettyXprint">if(row["Towns"]=='A' || row["Towns"]=='B' || row["Towns"]=='C' || row["Towns"]=='D'){row["Crime Count"]}</pre>I put the towns field on Y series grouping
This works fine except two things
1) On series1 which should be bars only and presented by mytown, I am also seeing other towns in legend. I want to see only mytown in series1. Hide other entries from the legend. Also, I am seeing a big space between bars, which means the graph is also considering these other towns even though their value is zero because of the if condition
2) in Series 2, I should not see mytown but other towns only. However, in legend, I am seeing mytown and on graph mytown has a zero valued line. I want mytown to disappear from series2 legend as well as from graph
Regards
Arif
</div>
Find more posts tagged with
Comments
There are no comments yet