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)
How to Add java script methd for value Series Dynamically
Rajan_Arx
I am creating Value series dynamically in beforegeneration . I have to add interactivity by calling some java script method on moue over . How can I script to achieve it. Please provide any sample lets say call alert() on mouseover on value series by script.<br />
<br />
Thanks in Advance !!<br />
<br />
var sdNew = SeriesDefinitionImpl.create();<br />
//create a new series for each parameter selection<br />
var as = AreaSeriesImpl.create();<br />
<br />
as.setTranslucent(true);<br />
as.getLabel().setVisible(false);<br />
var traceList = traceTierList
.split(":");<br />
var seriesidentifier = "" + traceList[0]+"_"+ traceList[1]; <br />
as.setSeriesIdentifier(seriesidentifier);<br />
<br />
//Create the query. The row value must correlate with the data set row value<br />
<br />
var qry = QueryImpl.create("if((row[\"TierID\"] +\"_\" + row[\"TraceType\"] ) == " +"\"" + seriesidentifier +"\""+")row[\"NTierEffectiveDeltaVal\"] ; else null;")<br />
<br />
<br />
as.getDataDefinition().add(qry)<br />
sdNew.getSeries().add( as );<br />
//Add the new series definition to the first y axis<br />
yAxis1.getSeriesDefinitions().add( sdNew );
Find more posts tagged with
Comments
bricombs
Good Day
Take a look at the following examples from our BIRT Exchange DevShare
MouseOver Chart Details with Aggregates
http://www.birt-exchange.org/org/devshare/designing-birt-reports/1358-mouseover-chart-details-with-aggregates/
Mouseover Highlight for Tables and Charts
http://www.birt-exchange.org/org/devshare/designing-birt-reports/571-mouseover-highlight-for-tables-and-charts/
Rajan_Arx
Hi,
interactivity integration in reports at design time is fairly straight forward .
But what I am looking for is how to attach the javascript methods from script code-behind as I am creating value series dynamically.
Thanks,
Rajan
bricombs
Good Day
Could you please attach a sample report that shows what you are currently doing. I can then use that as a starting point.