diff options
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-chart-controller.js')
-rw-r--r-- | ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-chart-controller.js | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-chart-controller.js b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-chart-controller.js index fc36b73d..8fa14643 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-chart-controller.js +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-chart-controller.js @@ -187,7 +187,8 @@ appDS2.controller('reportChartController', function ($scope, $rootScope, $timeou $scope.reportRunJson.categoryAxisJSON = {}; $scope.reportRunJson.categoryAxisJSON.value = -1; } - + //add the remove list to the json + $scope.reportRunJson.rangeAxisRemoveList= $scope.rangeAxisRemoveList; $http.post("save_chart", JSON.stringify($scope.reportRunJson)).success(function(data, status) { $scope.successSubmit=true; $scope.showLoader = false; @@ -201,8 +202,9 @@ appDS2.controller('reportChartController', function ($scope, $rootScope, $timeou $scope.reportRunJson.barChartOptions.timeAxis =$scope.reportRunJson.barChartOptions.timeAxis+""; $scope.reportRunJson.barChartOptions.verticalOrientation = $scope.reportRunJson.barChartOptions.verticalOrientation +""; $scope.reportRunJson.barChartOptions.xAxisDateType = $scope.reportRunJson.barChartOptions.xAxisDateType +""; - } - }) + } + $scope.populateChrtWzdFields(); + }) } @@ -211,14 +213,17 @@ appDS2.controller('reportChartController', function ($scope, $rootScope, $timeou }); }; - $scope.removeRangeAxisRow = function (index) { - $scope.reportRunJson.rangeAxisList.splice(index, 1); + $scope.rangeAxisRemoveList= []; + $scope.removeRangeAxisRow = function (index) { + $scope.rangeAxisRemoveList.push($scope.reportRunJson.rangeAxisList[index]); + $scope.reportRunJson.rangeAxisList[index].removed="true"; }; $scope.init = function () { if ($scope) { $scope.populateChrtWzdFields(); + $scope.reportRunJson.rangeAxisRemoveList= []; } }; |