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)
Chart Hide series if it has no value
Sandro
Hi together,
I want to make a chart in BIRT with different series. If a series has no value (is 0) I want to hide it. Actual BIRT is showing me a 0, so if I want to make a drill-down an click on the 0 I get an Report that I don?t want to show.
I have attached an image, so you can see what I mean. I want to hide the series which are 0. So that only series greater or equals 1 are shown.
Thanks for your help.
Greetings from Germany
Sandro
Find more posts tagged with
Comments
Sandro
Is there no possibility to do this?
I want to hide the series if the series in the x-axis-group has no values.
Sandro
Hase nobody an idea to do that?<br />
<br />
I tried it with Scripting in Java.<br />
In the beforeDrawDataPoint method I can test if the OrthoonalValue of a series with a special BaseValue is 0 or another value, like 2. Then I can color this one special block in a different color or something.<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
public void beforeDrawDataPoint(DataPointHints dph, Fill fill,
IChartScriptContext icsc) {
// TODO Auto-generated method stub
super.beforeDrawDataPoint(dph, fill, icsc);
if (dph.getBaseValue().equals("ERP")) {
((ColorDefinition) fill).set(255, 0, 0);
yWert = Double.parseDouble(dph.getOrthogonalValue().toString());
if (yWert == 1) {
((ColorDefinition) fill).set(255, 0, 1);
}
}
</pre>
<br />
In the beforeDrawSeries method I can hide the series. But is it possible to combine that in anyway? So that the invisible block is hide.<br />
<br />
I want to do that because if I define a drill through on the different blocks of the bar chart and a block have no values (0) there is no block visible, but there is still an invisible block where I can click on.