Sign in to follow this  
Vasanth1984

Fusion Chart Click Event

Recommended Posts

I had two questions:

 

-->I need to be able to pass the entire chart data when i click anywhere on the chart (except on data points)? What event do i use ?

 

-->I need to be able to pass a data of that "series" when i click on any of the hotspots or data points? What event do i use for this?

 

-->The last question was how do i distinguish between these two click events?

 

I looked around for events relating to this but didnt find any documentation for these clicks. Can you help me with this?

 

 

Thanks!

Share this post


Link to post
Share on other sites

Hi,

 

Welcome to FusionCharts Forum.

 

-->I need to be able to pass the entire chart data when i click anywhere on the chart (except on data points)? What event do i use ?

Ans: You may make the entire chart as a hotspot and then on clicking anywhere on the chart, you may open a JavaScript function. Inside this function, you may use "getXMLData()" or "getJSONData" functions to get the entire XML/JSON data.

 

You may use the attribute "clickURL" of chart element to make the entire chart as hotspot. 

 

Ref.

XML:

<chart ... clickURL='javaScript:myFunction()' >

 

JS:

function myFunction()

{

var chartReference = FusionCharts("myChartId"); 
var chartXML = chartReference.getXMLData();

}

 

For more information on getting chart data back from chart, refer : http://docs.fusioncharts.com/charts/contents/JavaScript/JS_DataBackFromChart.html

 

-->I need to be able to pass a data of that "series" when i click on any of the hotspots or data points? What event do i use for this?

Ans: You may use "link" attribute of set element for calling a JavaScript function and passing the required data.

 

Eg.

<set label='Jan' value='50' link='javaScript:myJS("50")' />

 

For more information, refer : http://docs.fusioncharts.com/charts/contents/DrillDown/JavaScript.html

 

-->The last question was how do i distinguish between these two click events?

Ans: The "link" attribute overrides the "clickURL". Hence, you will be able to have different links for data plots and for rest of the chart area.

 

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