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

Here, we'll see all the APIs exposed by data-streaming charts - the one which we've discussed previously and the ones which we've not.

Function Name Parameter Description
FusionWidgets XT general JavaScript API
The common JavaScript API for all charts, along with the deprecated functions - setDataURL and setDataXML, are discussed in FusionWidgets XT and JavaScript section.
Data-streaming chart related APIs
feedData(strData) strData This method feeds incremental data-stream to chart using JavaScript. The data stream has to be in the same format as provided by real-time data provider page.
getData() None This method returns the current data being shown on the chart as a JavaScript array.
stopUpdate() None This method stops the chart from self-updating itself.
restartUpdate() None If you've stopped the update of the chart, you can resume the update using this method.
clearChart() None This method clears the data currently being shown on the chart and sets the chart canvas afresh.
Message logger related APIs
showLog() None This method shows the message logger, if it was previously hidden.
hideLog() None This method hides the message logger, if it's visible.
clearLog() None This method clears the message log contents.

Additionally, you can control the annotations using JavaScript API, which has been discussed in the annotations sections.

You can call the JavaScript APIs of a chart only after it has rendered. You can use the FC_Rendered event tracker or the Rendered event listener to check if a chart has rendered. For more information, please see FusionWidgets XT and JavaScript section.


While accessing any of the JavaScript methods listed above, if you get an error like "... is not a function of ...", make sure of the following points:

  • Make sure that you're not calling the JavaScript method before the chart has loaded and rendered. You need to use the FC_Rendered function or define event listener for Rendered event of chart to track the loading of chart as explained in the FusionWidgets XT and JavaScript section.
  • Make sure that you're NOT running the chart from local file system (C:\ , D:\). Instead, run the chart from behind a server (localhost - IIS, Apache etc.). This is because the Flash Player security settings do not allow chart to JavaScript interaction on local file system by default, unless otherwise specifically set.