@@ -215,8 +215,6 @@ export class CircularHeatmapComponent implements OnInit {
215215 teamCheckbox ( taskIndex : number , teamKey : any ) {
216216 let _self = this ;
217217 var index = 0 ;
218- var cntTrue = 0 ;
219- var cntAll = 0 ;
220218 for ( var i = 0 ; i < this . ALL_CARD_DATA . length ; i ++ ) {
221219 if (
222220 this . ALL_CARD_DATA [ i ] [ 'SubDimension' ] === this . cardHeader &&
@@ -231,36 +229,7 @@ export class CircularHeatmapComponent implements OnInit {
231229 ! this . ALL_CARD_DATA [ index ] [ 'Task' ] [ taskIndex ] [ 'teamsImplemented' ] [
232230 teamKey
233231 ] ;
234- // Creating counter for %done
235- // for (var i = 0; i < this.ALL_CARD_DATA[index]['Task'].length; i++) {
236- // var teamList: any;
237- // teamList = this.ALL_CARD_DATA[index]['Task'][i]['teamsImplemented'];
238- // // (Object.keys(teamList) as (keyof typeof teamList)[]).forEach(
239- // // (key, index) => {
240- // // if (teamList[key] === true) {
241- // // cntTrue += 1;
242- // // }
243- // // cntAll += 1;
244- // // }
245- // // );
246-
247- // }
248-
249- this . ALL_CARD_DATA [ index ] [ 'Done%' ] = cntTrue / cntAll ;
250- console . log ( this . ALL_CARD_DATA [ index ] [ 'Done%' ] , cntTrue ) ;
251- var color = d3
252- . scaleLinear < string , string > ( )
253- . domain ( [ 0 , 1 ] )
254- . range ( [ 'white' , 'green' ] ) ;
255-
256- d3 . selectAll (
257- '#segment-' +
258- this . ALL_CARD_DATA [ index ] [ 'SubDimension' ] . replace ( / / g, '-' ) +
259- '-' +
260- this . ALL_CARD_DATA [ index ] [ 'Level' ] . replace ( ' ' , '-' )
261- ) . attr ( 'fill' , function ( p ) {
262- return color ( _self . ALL_CARD_DATA [ index ] [ 'Done%' ] ) ;
263- } ) ;
232+
264233 this . saveState ( ) ;
265234 this . reColorHeatmap ( ) ;
266235 }
@@ -674,25 +643,11 @@ export class CircularHeatmapComponent implements OnInit {
674643 cntAll += 1 ;
675644 }
676645 }
677- // if (
678- // this.selectedTeamChips[0] === 'All' ||
679- // key === this.selectedTeamChips[0]
680- // ) {
681- // // console.log('Yes');
682- // if (taskTeamList[key] === true) {
683- // cntTrue += 1;
684- // }
685- // } else {
686- // // console.log('No');
687- // }
688-
689- // cntAll += 1;
690646 }
691647 ) ;
692648 }
693649 if ( cntAll !== 0 ) {
694650 this . ALL_CARD_DATA [ index ] [ 'Done%' ] = cntTrue / cntAll ;
695- // console.log(this.ALL_CARD_DATA[index]['Done%'], cntTrue);
696651 var color = d3
697652 . scaleLinear < string , string > ( )
698653 . domain ( [ 0 , 1 ] )
0 commit comments