Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Accessing Report Context from Chart Interactivity JavaScript
Accessing Report Context from Chart Interactivity JavaScript [message #692314] Mon, 04 July 2011 08:07 Go to next message
pickle_supreme is currently offline pickle_supremeFriend
Messages: 13
Registered: July 2011
Junior Member
This has been bugging me for a few days now, and I thought someone here may have an answer. In my project, there is a chart with a mouseOver event listener that displays an extended, formatted value in a tooltip when the user hovers over the point on the graph.

So far so good, but the tooltip will occasionally truncate the text when it is too long, so I thought I will write a small JavaScript in the mouseClick event listener that will look up the required value from a global persistent variable that I defined elsewhere in the script. However, it turns out that the chart interactivity javascript cannot access the reportContext object! The only objects being passed to it are the event, dataValue and categoryValue. Anyone has a helpful suggestion on how to get the reference to the reportContext in the interactivity script?
Re: Accessing Report Context from Chart Interactivity JavaScript [message #692913 is a reply to message #692314] Tue, 05 July 2011 13:11 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

The reportcontext is available in server side scripting. The chart
interactivity is client side scripting and has no access to the report
context. You can work around this by creating js arrays in a script tag
inside a text element and using the invoke script client interactivity
function in the chart. Take a look at the attached example. A hidden
table loads up a js array that is used in a text element script tag.
The chart calls this client side function.

Jason

On 7/4/2011 4:07 AM, forums-noreply@eclipse.org wrote:
> This has been bugging me for a few days now, and I thought someone here
> may have an answer. In my project, there is a chart with a mouseOver
> event listener that displays an extended, formatted value in a tooltip
> when the user hovers over the point on the graph.
> So far so good, but the tooltip will occasionally truncate the text when
> it is too long, so I thought I will write a small JavaScript in the
> mouseClick event listener that will look up the required value from a
> global persistent variable that I defined elsewhere in the script.
> However, it turns out that the chart interactivity javascript cannot
> access the reportContext object! The only objects being passed to it are
> the event, dataValue and categoryValue. Anyone has a helpful suggestion
> on how to get the reference to the reportContext in the interactivity
> script?
Previous Topic:Birt chart detail on click
Next Topic:Urgent Help Required - Dynamically read the dataset result using BIRT APIs
Goto Forum:
  


Current Time: Thu Mar 28 18:12:51 GMT 2024

Powered by FUDForum. Page generated in 0.03198 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top