JavaScript events raised by the chart |
|||||||||||||||||||||
All the charts in FusionWidgets v3 suite can raise the following events. Please note that the events are raised only when registerWithJS flag of the chart is set to 1. |
|||||||||||||||||||||
|
|||||||||||||||||||||
How to track these events? | |||||||||||||||||||||
The events raised by FusionWidgets are simple JavaScript functions that are invoked, and the DOMId of the invoking chart is passed to the function to help you identify the source. For example, the FC_Rendered event for a chart can be tracked using following code: | |||||||||||||||||||||
<HTML> <HEAD> <TITLE>FusionWidgets & JavaScript - Basic Example</TITLE> <SCRIPT LANGUAGE="Javascript" SRC="../../FusionCharts/FusionCharts.js"></SCRIPT> <SCRIPT LANGUAGE="JavaScript"> //FC_Rendered method is called whenever a FusionWidgets chart on the page //has finished initial rendering. To this function, the chart passes its //own DOM Id. function FC_Rendered(DOMId){ //If it's our required chart if (DOMId=="chart1Id"){ //Simply alert window.alert("Look Ma! I am Bulb Gauge and I've finished loading and rendering."); return; } } </SCRIPT> </HEAD> <BODY> <div id="chart1div"> FusionCharts </div> <script language="JavaScript"> var chart1 = new FusionCharts("../../FusionCharts/Bulb.swf", "chart1Id", "400", "300", "0", "1"); chart1.setDataXML("<chart>...</chart>"); chart1.render("chart1div"); </script> </BODY> </HTML> |