diff --git a/app/index.html b/app/index.html index 5192d1b..46fec53 100644 --- a/app/index.html +++ b/app/index.html @@ -254,5 +254,19 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/partials/analytics/analytics.controller.js b/app/partials/analytics/analytics.controller.js index bc8ff95..22dbaa6 100644 --- a/app/partials/analytics/analytics.controller.js +++ b/app/partials/analytics/analytics.controller.js @@ -3,8 +3,8 @@ angular.module('acufuel') .controller('analyticsController', ['$scope', 'analyticsService', function($scope, analyticsService) { - - $scope.getAllRegionalPap = function() { + // Sand Signika Overview without drill down -KD + /* $scope.getAllRegionalPap = function() { $scope.flag=true; $scope.stateList = [{region:'Alabama',code:'AL'},{region:'Alaska',code:'AK'},{region:'Arizona',code:'AZ'},{region:'Arkansas',code:'AR'}, {region:'California',code:'CA' },{region:'Colorado',code:'CO'},{region:'Connecticut',code:'CT'},{region:'Delaware',code:'DE'}, @@ -63,7 +63,7 @@ angular.module('acufuel') enabled: true }, - /* colorAxis: { + colorAxis: { min: 1, type: 'logarithmic', minColor: '#2b908f', @@ -73,7 +73,7 @@ angular.module('acufuel') [5, '#f45b5b'], [10, 'rgb(117,0,0)'] ] - },*/ + }, series: [{ animation: { @@ -95,7 +95,195 @@ angular.module('acufuel') }) } - $scope.getAllRegionalPap(); + $scope.getAllRegionalPap();*/ + + + //Implemented drill down chart and Now used this on 07 Sep 2018 -KD + + /* + TODO: + - Check data labels after drilling. Label rank? New positions? + */ + $scope.getAllRegionalPapDrilldown = function() { + $scope.flag=true;//for spinner + var data = Highcharts.geojson(Highcharts.maps['countries/us/us-all']); + var separators = Highcharts.geojson(Highcharts.maps['countries/us/us-all'], 'mapline'); + // Some responsiveness + //var small = $('#container').width() < 400; + + analyticsService.getAllRPP().then(function(result) { + for (var i = 0; i < data.length; i++) { + for (var j = 0; j Failed loading ' + e.point.name); + fail = setTimeout(function () { + chart.hideLoading(); + }, 1000); + } + }, 3000); + + // Show the spinner + chart.showLoading(''); // Font Awesome spinner + + // Load the drilldown map + $.getScript('https://code.highcharts.com/mapdata/' + mapKey + '.js', function () { + + var region = e.point.name; + //called the get api region wise + analyticsService.getRPP(region).then(function(result) { + + data = Highcharts.geojson(Highcharts.maps[mapKey]); + + for (var i = 0; i < data.length; i++) { + for (var j = 0; j @@ -155,7 +156,10 @@
-
+ + + +