Client-side JavaScript API |
FusionWidgets XT allows you to control few aspects of the message logger using its client-side JavaScript API. Basically, you can do the following:
Here, we'll see how to do these. |
Manipulating the logger using client-side JavaScript |
You can manipulate the message logger using JavaScript APIs. For this, you need to get the reference to the chart. To get the reference to a chart, you can use the DOMID of the chart and pass it using any of the following ways: var chartRef = FusionCharts("myChartId"); or var chartRef = FusionCharts.items["myChartId"]; The legacy function getChartFromId() still works as show below: var chartRef = getChartFromId("myChartId"); However, note that getChartFromId() has been deprecated. 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. Once the reference to chart is attained, you can use any of the functions below on the chart's logger (provided it's set to on):
If you get JavaScript errors when accessing the above functions, make sure of following:
|