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)
Highlight a crosstab column with javascript
zFoot
<p>I want to click a point on a chart that highlights a specific column in a crosstab on the same report. I can't find a way to do it with jsapi and there is no id on the individual cells.</p>
Find more posts tagged with
Comments
pricher
<p>Hi,</p>
<p> </p>
<p>First of all, your question should have been posted to the Designing BIRT Report forum.</p>
<p> </p>
<p>Nevertheless, one option is to write JavaScript in your report(not JSAPI) to change the style of the cells in the crosstab.</p>
<p> </p>
<p>In the attached example, I have added some script after the crosstab.</p>
<p> </p>
<p>Function applyColor takes 2 arguments, column and color, and is used to find the HTML elements where we need to change the background color. The argument to getElementById is a bookmark created dynamically in the CNT_Group/COUNTRY data element.</p>
<p> </p>
<p>Function changeColor is there to allow resetting the original background if a column has been changed already.</p>
<p> </p>
<p>On the chart, I added Interactivity to the Value-Y series to call the changeColor script.</p>
<p> </p>
<p>Hope this helps,</p>
<p> </p>
<p>P.</p>
mwilliams
I have moved the post to the designing forum.
zFoot
<p>I got it work in F-Type by using document.getElementById("js3___" + column + "__" + cnt).parentNode in the script.</p>