Sign in to follow this  
OMMPAVAN

Call Java Sciprt Or Zquery Method

Recommended Posts

Hai can u give a small example for below algorithm

 

When i click on any bar in my chart it should call one JavaScript function and it will show one alert box . i tried with below code but could not get .please give be runnable example .

 

i tried with below code but no affect.

// ---------------- Event handlers ---------------------//

var objL:Object = new Object();

 

objL.linkClicked = function(targetObj:Object){

trace("Data belonging to " + targetObj.link + " was clicked");

}

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

A warm welcome to FusionCharts Forum! smile.gif

 

You can use JavaScript functions as links feature.

 

Using this feature, you can invoke JavaScript function by clicking on the single data-point of the chart.

 

FusionCharts XT provides two ways of setting JavaScript functions as links:

 

> j-prefix: place the function name after the j- notation. The function will be evaluated as a standard JavaScript function and anything placed after the function name separated by a - (dash) will be passed as a single String parameter to the function.

 

Ref. Code:

<set label='USA' value='235' link="j-myJS-USA,235"/>

 

> javascript: provide single or multiple JavaScript functions or statements after JavaScript: prefix.

 

Ref. Code:

<set label='USA' value='235' link="JavaScript: isJavaScriptCall=true; alert('hi JS!'); myJS('USA',235);"/>

 

For more information, please refer the following link:

http://docs.fusionch...JavaScript.html

 

Also, if you are looking for events, FusionCharts JavaScript Class API provides a number of events.

 

You can get more details about the events from here: http://docs.fusionch...API/Events.html

 

Also, find attached illustration for your reference which uses j-prefix.

 

Hope this helps!

jPrefix_Sample.zip

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this