Sign in to follow this  
jesse.martinez

Gantt Chart onClick event?

Recommended Posts

I was wondering if it is possible to listen on gantt chart click events, specifically on gantt task bar clicks.

 

 

 

I want to call a javascript function whenever the user clicks on top of one of the gantt task bars.

 

 

 

I will appreciate the help.

Share this post


Link to post
Share on other sites
Hello jesse.martinez,
There is in fact a very easy and convenient way to make the Gantt task bars clickable. To do that, you must link the JavaScript function to the task bar/s. The xml format for doing this is as follows:
 
<task start='02/04/2007' end='02/10/2007' link="j-myJS-Hello"/>
 
(Here, myJS is the function name of a JavaScript function, and Hello is the parameter.)
 
 
I hope this helps you. For more information, please follow this link: http://www.fusioncharts.com/docs/Contents/DrillDown/JavaScript.html We hope to hear from you soon!
Edited by Guest

Share this post


Link to post
Share on other sites

Hi,I was checking how to create a clickable gantt charts.In the forum i saw a discussion where it was mentioned as following..

 

 

"There is in fact a very easy and convenient way to make the Gantt task bars clickable. To do that, you must link the JavaScript function to the task bar/s. The xml format for doing this is as follows:

 

 

 

(Here, myJS is the function name of a JavaScript function, and Hello is the parameter.)"

 

But when i tried, it was clickable but dint show the alert..Should i include any library...Please help me,

Share this post


Link to post
Share on other sites

Hi,

 

Please note that the Flash Player Global Security settings needs to be enabled, if you are running the application from local file system (C:\ or D:\) and not from web server (local or live).

 

Flash Player's Global Security setting blocks invoking/calling JavaScript from SWF (Flash Movie) by default. So you need to reset your setting into Global Security Setting panel and enable it while using Drill-down functions and various other JavaScript related functions.

 

Please refer to the following page for further details on the Flash Player Global Security settings:

http://docs.fusioncharts.com/charts/Tools/FlashPlayerSecuritySetup/HowToSetup.html

Also, please note that you can provide links on the <cetrgory>, <process> and <task> element in the Gantt chart. Using Links in the <task> element would make the task bars clickable.

 

For further details, please refer to the chart specific XML API sheet and also the Drill-down formats.

http://docs.fusioncharts.com/widgets/Contents/?Gantt/XMLAPI.html

http://docs.fusioncharts.com/widgets/Contents/?DrillDown/LinkFormat.html

Hope this helps. :)

Share this post


Link to post
Share on other sites

Hye john,

 

It seems you are running the example from a local file system where your browser shows file:/// in the address bar or drive:\path formats in the address bar. If this be the case, you can try once running the example from a web server - remote or local (like IIS, APACHE, WAMP, MAMA etc.)

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