You are viewing documentation for an older version. For current documentation - click here.

FusionWidgets XT uses FusionCharts JavaScript Class that takes care of all the products of FusionCharts XT Suite including FusionWidgets XT.

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 the 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 the 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 the 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 Global static class
Initialized 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.

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 or 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.
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_Warning 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
 
Events raised by FusionCharts JavaScript instance
DataLoadRequested not available This event is raised when chart data is requested from a URL. This is fired only when data source is a 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. It 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 the 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. It 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. It 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. It 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. It 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. It 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 the 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 the 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 the FC_Rendered function (simple event model) is the 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, each real-time data update or chart reload. 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
RealtimeUpdateComplete FC_ChartUpdated This event is raised every time a real-time chart or gauge updates itself with new data. This event is raised in any of the following cases: The event argument provided by FC_ChartUpdated function (simple event model) is the 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.
RealtimeUpdateError not available This event is raised when an error occurs while performing real-time update using datastreamURL. The event arguments provided in the advanced model are:

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

argumentsObject : This object contains the property listed below:
  • httpStatus : The HTTP Error status value  as number (e.g., 404)
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
ExportReady FC_ExportReady This event is raised as soon as a chart has finished the capturing phase and is ready to be relayed to the FusionCharts Export Component.

This event is raised only when client-side export feature is used.

You can use this event to track the progress of your export.

The event argument provided by theFC_ExportReady function (simple event model) is the 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 all the export related properties listed below:
  • exportAction
  • exportAtClient
  • exportCallback
  • exportFileName
  • exportFormat
  • exportFormats
  • exportHandler
  • exportParameters
  • exportTargetWindow
Exported FC_Exported This event is raised when the chart has finished export as server-side save. This is used to know whether the export is successful. It also provides the path (web path for server-side save) 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_BatchExported 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.
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 the user, or to take a corrective measure. The event argument provided by FC_DataLoadError function (simple event model) is the 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 the user, or to take a corrective measure. The event argument provided by FC_NoDataToDisplay function (simple event model) is the 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 the 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.
LegendItemClicked not available This event is raised when any of the legend items are clicked. The event arguments provided in the advanced model are:

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

argumentsObject: The properties of this object for Multi-series charts are listed below:

  • datasetIndex: Index of the dataset represented by the legend item.
  • datasetName: Name of the dataset represented by the legend item.

The properties of this object for Funnel and Pyramid charts are listed below:

  • index: Index of the dataplot represented by the legend item.
  • name: Name of the dataplot represented by the legend item.
taskClicked

This event is applicable only for JavaScript Gantt chart.

Since v 3.3.1
not available This event is raised when you click on a task bar of a JavaScript Gantt 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:
  • start : Start date of the task
  • end : End date of the task
  • percentComplete : percentage of the task completed
  • processId : Id of the process in which the task resides
  • taskId : Id of the task
  • showAsGroup : If showAsGroup is 0, the task is not grouped and if it is 1, the task is grouped.
connectorClicked

This event is applicable only for JavaScript Gantt chart.

Since v 3.3.1
not available This event is raised when a connector item of a JavaScript Gantt chart is clicked. 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:
  • fromTaskConnectStart : Returns the value 0 if the connector is not connected to the left side of the starting task bar and 1 if the connector is connected to the left side of the starting task bar.
  • fromTaskId : Id of the starting task bar.
  • toTaskConnectStart : Returns the value 0 if the connector is not connected to the left side of the ending task bar and 1 if the connector is connected to the left side of the ending task bar.
  • toTaskId : Id of the ending task bar of the connector.