Access your charts using JavaScript
For us to implement any of the previously mentioned functionalities, we will first need to access the FusionCharts JavaScript object. We call this the chart object. The chart object consists of a number of functions and variables that allow us to programmatically communicate with the charts.
In Chapter 1, Introducing FusionCharts, we executed the statement var myChart = new FusionCharts("../FusionCharts/Column2D.swf", "myChartId", "400", "300", "0", "1")
, to create our first chart. The object that got stored within the myChart
variable was the chart object itself. However, to implement the audit report page, we will look into other methods to access the chart object.