Sign in to follow this  
Upendar Srirangam

Can We Attach An Event For Clicking On A Specific Bar In The Bar Chart

Recommended Posts

Hi Team,

We have a requirement where if user clicks on the specific Bar of a Bar Chart, we need to show a new dialog window with actual data of that particular Bar in the Bar chart. Can you please furnish the details of how it can be done. ( We use Javascript Renderer). POC for the same is appreciated.

Thanks

Upendar.

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi Upendar,

 

FusionCharts XT provides "JavaScript functions as links" feature.

 

You can invoke a JavaScript function present in the same page (in which the chart is present) when the you click on data plot of the chart.

 

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

 

> j- prefix : Just 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: prefix : 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.fusioncharts.com/charts/contents/?DrillDown/JavaScript.html

 

Hope this helps!

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