@@ -59,10 +59,9 @@ export class CircularHeatmapComponent implements OnInit {
5959 this . yaml . setURI ( './assets/YAML/generated/generated.yaml' ) ;
6060 // Function sets data
6161 this . yaml . getJson ( ) . subscribe ( data => {
62- //console.log(this.radial_labels)
6362 this . YamlObject = data ;
63+
6464 var allDimensionNames = Object . keys ( this . YamlObject ) ;
65- //console.log(allDimensionNames)
6665 for ( var i = 0 ; i < allDimensionNames . length ; i ++ ) {
6766 var allSubDimensionInThisDimension = Object . keys (
6867 this . YamlObject [ allDimensionNames [ i ] ]
@@ -71,7 +70,6 @@ export class CircularHeatmapComponent implements OnInit {
7170 this . segment_labels . push ( allSubDimensionInThisDimension [ j ] ) ;
7271 }
7372 }
74- // console.log(this.segment_labels);
7573 for ( var l = 0 ; l < this . maxLevelOfTasks ; l ++ ) {
7674 var allDimensionNames = Object . keys ( this . YamlObject ) ;
7775 for ( var i = 0 ; i < allDimensionNames . length ; i ++ ) {
@@ -128,7 +126,6 @@ export class CircularHeatmapComponent implements OnInit {
128126 }
129127 }
130128 }
131- //console.log(this.ALL_CARD_DATA);
132129 this . loadState ( ) ;
133130 this . loadCircularHeatMap (
134131 this . ALL_CARD_DATA ,
@@ -141,7 +138,6 @@ export class CircularHeatmapComponent implements OnInit {
141138 }
142139
143140 toggleCheckbox ( taskIndex : number ) {
144- //console.log('fo')
145141 let _self = this ;
146142 var index = 0 ;
147143 var cnt = 0 ;
@@ -159,9 +155,7 @@ export class CircularHeatmapComponent implements OnInit {
159155 } else {
160156 this . ALL_CARD_DATA [ index ] [ 'Task' ] [ taskIndex ] [ 'ifTaskDone' ] = true ;
161157 }
162- //console.log(this.data[i]["Task"][taskIndex]["done"])
163158 for ( var i = 0 ; i < this . ALL_CARD_DATA [ index ] [ 'Task' ] . length ; i ++ ) {
164- console . log ( this . ALL_CARD_DATA [ index ] [ 'Task' ] [ i ] [ 'ifTaskDone' ] ) ;
165159 if ( this . ALL_CARD_DATA [ index ] [ 'Task' ] [ i ] [ 'ifTaskDone' ] ) {
166160 cnt += 1 ;
167161 }
@@ -175,7 +169,6 @@ export class CircularHeatmapComponent implements OnInit {
175169 if ( allSubDimensionInThisDimension [ j ] == this . cardHeader ) {
176170 var taskName =
177171 this . ALL_CARD_DATA [ index ] [ 'Task' ] [ taskIndex ] [ 'taskName' ] ;
178- //console.log(taskName)
179172 this . YamlObject [ allDimensionNames [ i ] ] [
180173 allSubDimensionInThisDimension [ j ]
181174 ] [ taskName ] [ 'isImplemented' ] =
@@ -186,7 +179,6 @@ export class CircularHeatmapComponent implements OnInit {
186179 }
187180 this . ALL_CARD_DATA [ index ] [ 'Done%' ] =
188181 cnt / this . ALL_CARD_DATA [ index ] [ 'Task' ] . length ;
189- //console.log(this.data[index]['Done%'],cnt)
190182 var color = d3
191183 . scaleLinear < string , string > ( )
192184 . domain ( [ 0 , 1 ] )
@@ -209,9 +201,6 @@ export class CircularHeatmapComponent implements OnInit {
209201 radial_labels : string [ ] ,
210202 segment_labels : string [ ]
211203 ) {
212- //console.log(segment_labels)
213- //d3.select(dom_element_to_append_to).selectAll('svg').exit()
214- //console.log(dataset)
215204 let _self = this ;
216205 var margin = {
217206 top : 50 ,
@@ -271,31 +260,25 @@ export class CircularHeatmapComponent implements OnInit {
271260 svg
272261 . selectAll ( 'path' )
273262 . on ( 'click' , function ( d ) {
274- console . log ( d ) ;
275263 try {
276264 curr = d . explicitOriginalTarget . __data__ ;
277265 } catch {
278266 curr = d . srcElement . __data__ ;
279267 }
280- //console.log(curr);
281268 _self . currentDimension = curr . Dimension ;
282269 _self . cardSubheader = curr . Level ;
283270 _self . tasksData = curr . Task ;
284271 _self . cardHeader = curr . SubDimension ;
285272 _self . showTaskCard = true ;
286- //console.log(_self.tasksData)
287273 } )
288274 . on ( 'mouseover' , function ( d ) {
289- //console.log(d.toElement.__data__.Name)
290275 try {
291276 curr = d . explicitOriginalTarget . __data__ ;
292277 } catch {
293278 curr = d . toElement . __data__ ;
294279 }
295- //console.log(curr)
296280 // increase the segment height of the one being hovered as well as all others of the same date
297281 // while decreasing the height of all others accordingly
298- //console.log(d)
299282 if ( curr [ 'Done%' ] != - 1 ) {
300283 d3 . selectAll (
301284 '#segment-' +
@@ -307,13 +290,6 @@ export class CircularHeatmapComponent implements OnInit {
307290 } )
308291
309292 . on ( 'mouseout' , function ( d ) {
310- //console.log(d.explicitOriginalTarget.__data__.Day)
311-
312- // var time = d.Time;
313- // var timeCleaned = time.split(":").join("-");
314- // var segment = d3.select("#segment-"+d.Day +"-"+timeCleaned); //designate selector variable for brevity
315- // var fillcolor = segment.select("desc").text(); //access original color from desc
316- // segment.style("fill", fillcolor);
317293 if ( curr [ 'Done%' ] != - 1 ) {
318294 d3 . selectAll (
319295 '#segment-' +
@@ -326,7 +302,6 @@ export class CircularHeatmapComponent implements OnInit {
326302 . domain ( [ 0 , 1 ] )
327303 . range ( [ 'white' , 'green' ] ) ;
328304 // how to access a function within reusable charts
329- //console.log(color(d.Done));
330305 return color ( curr [ 'Done%' ] ) ;
331306 } ) ;
332307 } else {
@@ -358,8 +333,6 @@ export class CircularHeatmapComponent implements OnInit {
358333 var radialLabels = [ ] ;
359334 var segmentLabels : any [ ] = [ ] ;
360335
361- //console.log(segmentLabels)
362-
363336 function chart ( selection : any ) {
364337 selection . each ( function ( this : any , data : any ) {
365338 var svg = d3 . select ( this ) ;
@@ -393,7 +366,6 @@ export class CircularHeatmapComponent implements OnInit {
393366 . data ( data )
394367 . enter ( )
395368 . append ( 'path' )
396- // .attr("class","segment")
397369 . attr ( 'class' , function ( d : any ) {
398370 return 'segment-' + d . SubDimension . replace ( / / g, '-' ) ;
399371 } )
@@ -422,7 +394,6 @@ export class CircularHeatmapComponent implements OnInit {
422394 } ) ;
423395
424396 // Unique id so that the text path defs are unique - is there a better way to do this?
425- // console.log(d3.selectAll(".circular-heat")["_groups"][0].length)
426397 var id = 1 ;
427398
428399 //Segment labels
@@ -546,11 +517,8 @@ export class CircularHeatmapComponent implements OnInit {
546517 }
547518
548519 noTasktoGrey ( ) : void {
549- console . log ( this . ALL_CARD_DATA ) ;
550520 for ( var x = 0 ; x < this . ALL_CARD_DATA . length ; x ++ ) {
551521 if ( this . ALL_CARD_DATA [ x ] [ 'Done%' ] == - 1 ) {
552- console . log ( this . ALL_CARD_DATA [ x ] [ 'SubDimension' ] ) ;
553- console . log ( this . ALL_CARD_DATA [ x ] [ 'Level' ] ) ;
554522 d3 . selectAll (
555523 '#segment-' +
556524 this . ALL_CARD_DATA [ x ] [ 'SubDimension' ] . replace ( / / g, '-' ) +
@@ -573,15 +541,12 @@ export class CircularHeatmapComponent implements OnInit {
573541 if ( this . taskDetails ) {
574542 this . taskDetails . navigationExtras = navigationExtras ;
575543 }
576- console . log ( this . taskDetails ) ;
577544 this . showOverlay = true ;
578545 }
579546 closeOverlay ( ) {
580- console . log ( 'hey' ) ;
581547 this . showOverlay = false ;
582548 }
583549 SaveEditedYAMLfile ( ) {
584- //console.log(this.YamlObject);
585550 let yamlStr = yaml . dump ( this . YamlObject ) ;
586551 let file = new Blob ( [ yamlStr ] , { type : 'text/csv;charset=utf-8' } ) ;
587552 var link = document . createElement ( 'a' ) ;
0 commit comments