Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Change datapoint colour according to alternate series value
Migrateduser
Hi All,<br />
<br />
I want to highlight bars in a stacked bar graph according to a third series value. This means that I cannot use dph.getOrthogonalValue(). For example if my query looks like this:<br />
<br />
TYPE COUNT SIZE<br />
<br />
A 40 1.5<br />
A 10 2.2<br />
B 60 4.1<br />
<br />
I would like the bars grouped by type, bar size by count and the colour according to value. I tried adding an invisible series to the chart and adding this in the onRender event of the chart.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
i = 0;
diffSeries = [];
function afterDataSetFilled(series, dataSet, icsc)
{
if( series.getSeriesIdentifier() == "SIZE"){
diffSeries = dataSet.getValues();
}
}
function beforeDrawDataPoint(dph, fill, icsc)
{
if (Math.abs(diffSeries[i]) >= 2) {
fill.set(0,255,0);
};
i++;
}
</pre>
<br />
What I found is that the dataSet values are not ordered in the same way as the data points are rendered. Is there any way to change the fill colour by the "SIZE" value and draw the datapoint according to the "COUNT" value?<br />
<br />
I'm using BIRT 2.3.2.<br />
<br />
Thanks in advance.
Find more posts tagged with
Comments
There are no comments yet