Guest Rajroop

Mouse OnClick event handler

Recommended Posts

Hi guys,

 

 

 

I am just starting to use fusion chart, and would like to ask some questions about mouse event handling.

 

 

 

Here's what I am trying to do.

 

 

 

So, I have a table and a FusionChart graph.

 

 

 

I would like to update the chart when I click on a data point on FusionChart.

 

 

 

In other words, I would like to invoke javascript when a mouse-click even happens to call AJAX to update the table.

 

 

 

But it seems like the out-of-box FusionChart does not handle mouse-click event. Am I correct?

 

 

 

 

 

So I guess I need to drill down to the source code and make a change.

 

 

 

Do you have any suggestion or documentation on this matter?

 

 

 

Any help would be appreciated.

 

 

 

Thank you

 

 

 

 

 

Stephen

Share this post


Link to post
Share on other sites
Guest Rajroop

Hey Stephen,

 

 

 

Welcome to the FusionCharts Forum. :hehe:

 

 

 

"...out-of-box FusionChart does not handle mouse-click event..."

 

 

 

I would like to humbly refute you on this point. :P

 

 

 

FusionCharts v3 offers tremendous integration capabilities with JavaScript. It seamlessly binds with JavaScript/AJAX to let you update charts on the client side, without invoking any page refreshes. All the charts in FusionCharts v3 suite support this functionality.

 

See: http://www.fusioncharts.com/Demos/Blueprint/

 

http://www.fusioncharts.com/DownloadDone.asp?bypass#BP

 

 

 

Also, please check our our online documentation for this?

 

Ref.- http://www.fusioncharts.com/docs/ > FusionCharts and JavaScript

 

 

 

I hope these change your viewpoint about FusionCharts. :D We would love it if you'd shared your feedback with us on this.

Share this post


Link to post
Share on other sites

Hello,

 

 

 

I am considering purchasing FCharts however i'm in the need of the same aforementioned feature - an onclick handler exposed on the api (similiar to the one in Open Flash Charts -> ofc_onclick). I need this feature to update other elements of the webpage according to the clicks users execute on the chart ( for example to highlight a row on a grid representing the value on the chart). Is such a feature planned?

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

Please note, instead of using simple links, you can also set JavaScript links using FusionCharts. That is, you can invoke a JavaScript function present in the same page (in which the chart is present) when the end viewer clicks a data element on the chart. Just place the function name 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.- <set label='USA' value='235' link="j-myJS-USA,235"/>

For further details please refer to the link mentioned below :-

Ref.- http://www.fusioncharts.com/docs/Contents/DrillDown/JavaScript.html

In case you wish to apply link to the whole chart instead of a single dataplot(s), please try using the attribute "clickURL" in the <chart> element.

Ref.- <chart...clickURL=your JS function or the link that you wish to provide>

Hope this helps. :P

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