Home DevShare Designing BIRT Reports

Mouseover Highlight for Tables and Charts

Share

by jmangan

Forum - 1 postDevShare - 1 post
Posted 22 Oct 2008 - 03:24 AM

(0)  (0)   (11615 views)

By downloading this item, you are agreeing to the Terms of Use for the site.

When you have a chart and/or a table, it would be nice to be able to mouse over a bar in the chart or the row in the table and have it highlighted. This example report uses a bit of javascript and bookmarks in the report to do that...

Birt Version:-

Rows in the table are highlighted when you move the mouse over them and the rows are also highlighted when you move the mouse over a bar in the chart.

 

To set up the table mouseover highlighting you need to set a data driven bookmark on the table row (in this case it's row["Country"]).

Then you need to include a javascript text item in your table (in this case it's in the footer) to hold the highlight function.

To add the chart hover highlighting, set the MouseOver event on the chart series to invoke a script.  Since the categories in the chart are row["Country"] in this case,  you can simply call highlight(categoryData)

 

Thanks to Andrew Paine for figuring this one out!

 

Download (47.05 KB)

By downloading this item, you are agreeing to the Terms of Use for the site.



Forum - 500 postsCommunity AdvisorBlog - 50 postsPoll Voter

Virgil

Posted: 27 Oct 2008 - 04:31 PM

Great example... I've wondered how to get the handle for the table. Thanks for posting.

robinboy

Posted: 13 Nov 2008 - 09:51 PM

thanks for your example

Forum - 25 posts

madhu_2009

Posted: 17 Apr 2009 - 01:39 AM

Thanks for ur example.. this solved my problem..

kkmahen

Posted: 30 Sep 2009 - 09:22 AM

This is nice, works fine on IE and Chrome Is there a fix for firefox?

charu

Posted: 08 Mar 2010 - 11:42 PM

can u please tell me if it is possible to add keypress event to the table row

Forum - 10 posts

ankitK

Posted: 09 Jan 2011 - 11:02 PM

Hi,Thanks great example. Only change i did was to move the script from the footer to the header section. So that the javascript is present on every page and not only the last.

Forum - 10 posts

ankitK

Posted: 09 Jan 2011 - 11:03 PM

Also, make sure that the bookmark returns a unique value for every row of the table as, bookmark(in BIRT) == id (in HTML)

Forum - 1 post

Ingoos

Posted: 05 Jul 2011 - 01:36 AM

:( this script don't work with Firefox 5.0 ... did anyone figure out how to fix it ? ... tnx :)
 
Filter More