FusionCharts JavaScript class API provides a number of events. Events are categorized into two broad groups - Simple Events and Advanced events. Each event provides arguments to the event-listeners. In simple event, most of events (except for FC_Exported and FC_Resized events) provides DOMId of the source chart that raised the event.  In advanced model, two event parameters are passed to the event listener function. The first parameter, eventObject, is structurally common for all events. The second parameter, argumentsObject contains event specific properties. Details of eventObject are given as follows:

Event parameters in advanced model

Each event sends parameters to event listener functions. In advanced event model, two event argument Objects are sent to event listener. The properties contained by the arguments are as follows:

  • The first argument is eventObject which provides details of the event. It is an object which provides three properties :
    • eventId : An unique id given to the event
    • eventType : A string containing the name or the event type e.g. "rendered" etc.
    • sender : A FusionCharts JavaScript Object reference to the chart which has raised that event
  • The second argument argumentsObject is an object which contains details of the particular event fired. As per the type of the event the properties of parameter objects varies.

The list shown below contains names of events of both Simple and Advanced events. Moreover, details of argumentsObject for each event is listed down.

Name (Advanced model) Name ( Simple model) What is it and when is it raised? Event parameters
Events raised by FusionCharts.printManager
PrintReadyStateChange not available This event is raised to notify the status of Print Manager.

It is raised twice. First, when Print Manager starts processing all charts. It is raised again when all the charts are ready for managed print.
The event arguments provided in the advanced model are :

eventObject : This object contains eventId, eventType and sender properties.

argumentsObject : This object contains properties listed below:

  • ready : (boolean) Whether the Print Manager has made the all the charts present in a page ready for managed print
  • bypass :(boolean) Whether printManager has been bypassed due to error, incompatibility, etc
 
Events raised by FusionCharts JavaScript instance
Initialize not available This event is raised when an instance of FusionCharts JavaScript class is initialized. This happens prior to data loading and chart creation events. The event arguments provided in the advanced model are :

eventObject : This object contains eventId, eventType and sender properties.

argumentsObject : This is passed as a blank object.

DataLoadRequested not available This event is raised when chart data is requested from an url. This is fired only when data source is an Url. The event arguments provided in the advanced model are :

eventObject : This object contains eventId, eventType and sender properties.

argumentsObject : This object contains properties listed below:

  • dataFormat: Type of Data format. Its can be either xml or json
  • source : Nature of data load request. Presently it's value is "XmlHttpRequest"
  • url : Url of the data source
  • cancelDataloadRequest(): function which can be called to cancel a data load (if required)
DataLoadRequestCancelled not available This event is raised when data load process is cancelled by calling cancelDataloadRequest() function in DataLoadRequested event-listener.

In cases where data source is a local path, this event is automatically raised.
The event arguments provided in the advanced model are :

eventObject : This object contains eventId, eventType and sender properties.

argumentsObject : This object contains properties listed below:

  • dataFormat: Type of Data format. Its can be either xml or json
  • source : Nature of data load request. Presently it's value is "XmlHttprequest"
  • url : Url of the data source
  • xmlHttpRequestObject : The object which has fetched data
DataLoadRequestCompleted not available This event is raised before chart data is loaded. The event arguments provided in the advanced model are :

eventObject : This object contains eventId, eventType and sender properties.

argumentsObject : This object contains properties listed below:

  • data : Chart data as XML or JSON string
  • dataFormat: Type of Data format. Its can be either xml or json
  • source : Nature of data load request. Presently it's value is "XmlHttprequest"
  • url : Url of the data source
  • xmlHttpRequestObject : The object which has fetched data
  • cancelDataLoad(): function which can be called to cancel a data load (if required)
DataLoadCancelled not available This event is raised when chart data loading is cancelled. The event arguments provided in the advanced model are :

eventObject : This object contains eventId, eventType and sender properties.

argumentsObject : This object contains properties listed below:
  • dataFormat: Type of Data format. Its can be either xml or json
  • source : Nature of data load request. Presently it's value is "XmlHttprequest"
  • url : Url of the data source
  • xmlHttpRequestObject : The object which has fetched data
BeforeDataUpdate not available This event is raised before data is loaded into FusionCharts JavaScript class and is ready to be passed to the chart. The event arguments provided in the advanced model are :

eventObject : This object contains eventId, eventType and sender properties.

argumentsObject : This object contains properties listed below:
  • dataFormat: Type of Data format. Its can be either xml or json
  • dataSource : Url of the data source
  • chartData : The original data sent by user
  • dataError : Error object if any error occurred
  • cancelDataUpdate() : function which can be called to cancel a data update (if required)
DataUpdated not available This event is raised when data is loaded into FusionCharts JavaScript class and is ready to be passed to the chart. The event arguments provided in the advanced model are :

eventObject : This object contains eventId, eventType and sender properties.

argumentsObject : This object contains properties listed below:
  • dataFormat: Type of Data format. Its can be either xml or json
  • dataSource : Url of the data source
  • underlyingDataSource : The original data sent by user
Loaded FC_Loaded This event is raised when the chart has finished downloading itself in the user's browser. You can use this to hide any loader components that you might have on your page. The event argument provided by FC_Loaded function (simple event model) is DOMId of the chart raising the event.

The event arguments provided in the advanced model are :

eventObject : This object contains eventId, eventType and sender properties.

argumentsObject : This is passed as a blank object.
DataLoaded FC_DataLoaded This event is raised when the chart has finished loading data. It can be used to further process data in any other components in your page. The event argument provided by FC_DataLoaded function (simple event model) is DOMId of the chart raising the event.

The event arguments provided in the advanced model are :

eventObject : This object contains eventId, eventType and sender properties.

argumentsObject : This is passed as a blank object.
Rendered FC_Rendered This event is raised when the chart has finished rendering. This call is made only once per loaded chart SWF (even if new data is supplied to it).  It can be used to invoke any further JavaScript methods on chart, or to change the data of chart. The event argument provided by FC_Rendered function (simple event model) is DOMId of the chart raising the event.

The event arguments provided in the advanced model are :

eventObject : This object contains eventId, eventType and sender properties.

argumentsObject :This is passed as a blank object.
DrawComplete not available This event is raised every time FusionCharts completes drawing a chart. This is also raised on each resize or chart reload. Even when you interact with the chart, say you slice a Pie, this event will be fired. The event arguments provided in the advanced model are :

eventObject : This object contains eventId, eventType and sender properties.

argumentsObject : This object contains properties listed below:
  • drawCount : Number specifying the number of times the chart is redrawn
  • height : Current height of the chart
  • width : Current width of the chart
Resized FC_Resized This event is raised when chart resizes. The event arguments provided by FC_Resized function (simple event model) are as follows:

  • DOMId : Id of the chart raising this event
  • width : Width of the chart after resize
  • height : Height of the chart after resize
  • prevWidth : Original width of the chart before resize
  • prevHeight : Original height of the chart before resize


The event arguments provided in the advanced model are :

eventObject : This object contains eventId, eventType and sender properties.

argumentsObject : This object contains properties listed below:

  • width : Width of the chart after resize
  • height : Height of the chart after resize
  • prevWidth : Original width of the chart before resize
  • prevHeight : Original height of the chart before resize
Exported FC_Exported This event is raised when the chart has finished export as server side save or client side download. This is used to know whether the export is successful. It also provides the path (web path for server side save and local path for client side download) where the exported file has been saved.

This event is not raised when Download action is performed.

The event argument provided by FC_Exported function (simple event model) is an Object containing the following properties:

  • DOMId : Id of the chart that has been exported
  • statusCode : Indicated the success status of the export process. In case of failure the value is passed as 0. On success, 1 is provided
  • statusMessage : Success or failure message
  • fileName : The name and path of the file where the exported file has been saved
  • width : The width of the chart
  • height : The height of the chart
  • notice : A consolidated string which contains export related notices and warnings. This is applicable only for server side export

The event arguments provided in the advanced model are :

eventObject : This object contains eventId, eventType and sender properties.

argumentsObject : This object contains properties listed below:

  • DOMId : Id of the chart that has been exported
  • statusCode : Indicated the success status of the export process. In case of failure the value is passed as 0. On success, 1 is provided
  • statusMessage : Success or failure message
  • fileName : The name and path of the file where the exported file has been saved
  • width : The width of the chart
  • height : The height of the chart
  • notice : A consolidated string which contains export related notices and warnings. This is applicable only for server side export
BatchExported FC_BatchExported This event is raised after Batch Export is performed using Client Side Export handler. The event argument provided by FC_Exported function (simple event model) is an Object containing the following properties:

  • DOMId : Id of the chart that has been exported
  • statusCode : Indicated the success status of the export process. In case of failure the value is passed as 0. On success, 1 is provided
  • statusMessage : Success or failure message
  • fileName : The name and path of the file where the exported file has been saved
  • width : The width of the chart
  • height : The height of the chart

The event arguments provided in the advanced model are :

eventObject : This object contains eventId, eventType and sender properties.

argumentsObject : This object contains properties listed below:

  • DOMId : Id of the chart that has been exported
  • statusCode : Indicated the success status of the export process. In case of failure the value is passed as 0. On success, 1 is provided
  • statusMessage : Success or failure message
  • fileName : The name and path of the file where the exported file has been saved
  • width : The width of the chart
  • height : The height of the chart
BeforeDispose not available This event is raised before a chart is going to be removed and cleaned from memory. Technically, It is raised just before a chart is to be disposed/deleted using dispose() by user or by JavaScript internally. This event is, in most cases, followed by a Disposed event.

The event arguments provided in the advanced model are :

eventObject : This object contains eventId, eventType and sender properties.

argumentsObject : This is passed as a blank object.
Disposed not available This event is raised after a chart is removed and cleaned from memory. Technically, It is raised just after a chart is disposed/deleted using dispose() by user or by JavaScript internally. The event arguments provided in the advanced model are :

eventObject : This object contains eventId, eventType and sender properties.

argumentsObject : This is passed as a blank object.
BeforeLinkedItemOpen not available This event is raised before a LinkedChart is opened. The event arguments provided in the advanced model are :

eventObject : This object contains eventId, eventType and sender properties.

argumentsObject : This object contains properties listed below:

  • level : Level (as number) of the LinkedChart
LinkedItemOpened not available This event is raised after a LinkedChart is opened. The event arguments provided in the advanced model are :

eventObject : This object contains eventId, eventType and sender properties.

argumentsObject : This object contains properties listed below:

  • level : Level (as number) of the LinkedChart
  • item : The JavaScript object instance of the LinkedChart that is opened
BeforeLinkedItemClose not available This event is raised before a LinkedChart is closed. The event arguments provided in the advanced model are :

eventObject : This object contains eventId, eventType and sender properties.

argumentsObject : This object contains properties listed below:

  • level : Level (as number) of the LinkedChart
  • item : The JavaScript object instance of the LinkedChart that is opened
LinkedItemClosed not available This event is raised after a LinkedChart is closed. The event arguments provided in the advanced model are :

eventObject : This object contains eventId, eventType and sender properties.

argumentsObject : This object contains properties listed below:

  • level : Level (as number) of the LinkedChart
DataLoadError FC_DataLoadError This event is raised when there was an error in loading data from the specified Url. It can be used to show an error message to user, or to take a corrective measure. The event argument provided by FC_DataLoadError function (simple event model) is DOMId of the chart raising the event.

The event arguments provided in the advanced model are :

eventObject : This object contains eventId, eventType and sender properties.

argumentsObject : This object contains properties listed below:

  • error : JavaScript error object which describes the underlying error which has raised this event
  • httpStatus : A number which Denotes the HTTP status number when the error was raised.For example, the status will be 404 for url not found."
  • source : Denotes who raised the error. It is generally undefined when SWF raises this event, but is otherwise equal to "XmlHttpRequest" in case the error was raised due to AJAX request
  • xmlHttprequestObject : The httpRequest object associated with this data transaction
NoDataToDisplay FC_NoDataToDisplay This event is raised when the XML data loaded by chart didn't contain any data to display. It can be used to show an error message to user, or to take a corrective measure. The event argument provided by FC_NoDataToDisplay function (simple event model) is DOMId of the chart raising the event.

The event arguments provided in the advanced model are :

eventObject : This object contains eventId, eventType and sender properties.

argumentsObject : This is passed as a blank object.
DataXMLInvalid FC_DataXMLInvalid This event is raised when the XML data loaded by chart is invalid. It can be used to show an error message to user, or to take a corrective measure. The event argument provided by FC_DataXMLInvalid function (simple event model) is DOMId of the chart raising the event.

The event arguments provided in the advanced model are :

eventObject : This object contains eventId, eventType and sender properties.

argumentsObject : This is passed as a blank object.
Error FC_Error This event is raised when error occurs in JavaScript implementation. The event arguments provided by FC_Error function (simple event model) is same event arguments passed to event listener in advanced model as described below:

The event arguments provided in the advanced model are :

eventObject : This object contains eventId, eventType and sender properties.

argumentsObject : This object contains properties listed below:

  • id :  Unique id of the error
  • nature : Nature of the error. The value can be one of these - 'TypeException', 'ValueRangeException', 'NotImplementedException', 'ParameterException', 'RuntimeException', DesignTimeError'
  • source :  This gives a hint at the function, object etc. where the error is raised
  • message : Error message
Warning FC_Warning This event is raised when there are minor errors or warnings while implementing the chart. The event arguments provided by FC_Error function (simple event model) is same event arguments passed to event listener in advanced model as described below:

The event arguments provided in the advanced model are :

eventObject : This object contains eventId, eventType and sender properties.

argumentsObject : This object contains properties listed below:

  • id :  Unique id of the error
  • nature : Nature of the error. The value can be one of these - 'TypeException', 'ValueRangeException', 'NotImplementedException', 'ParameterException', 'RuntimeException', DesignTimeError'
  • source :  This gives a hint at the function, object etc. where the error is raised
  • message : Error message
Zoom line chart provides some more events which you can locate in Zoom Line Chart API page.