getInitialDataAndCreateChartData method is called in constructor to get Initial data.
getGraphData method calls RestConnection method to get data.
When data has come in getInitialDataAndCreateChartData method:
Extra variables are set.
getMultiChartData is called to get data converted into chart format.
setPageMultiChartSrc is called to set src data.
On click of chart, page's callback method will be called(evtChartClick):
Get the clicked item index from getClickedItemIndex which calculates it using newActiveId.
Get clicked level form getClickedLevel method.
Update firstLevelClickedIndex variable if clicked Level is not 1.
Get urlBody from getUrlBody method.
If urlBody has a groupField then that means it has next chart to be shown, so call getGraphData method else call evtClickTableView method.
-After getting data, do the following steps:
- Get chartHeading using label and groupField.
- Get chart type from groupFieldChartOrder of first click data.
- Get multi chart data using getMultiChartData method.
- If first level data does not have next group field then set isLast property in multi chart data.
- Set activeChartId variable by disabling dirtyCheck and then enabling.
On click of dashboard header, call evtClickToggleDashboard:
Set showTable as false and toggle showDashboard.
On click of Go To Table View button or Table header:
Set showDashboard as false.
Toggle showTable.
If showTable is true then create iframe url and set its attribute.