Skip to content

Commit 252fa55

Browse files
committed
heatmap color % changing with team filter
1 parent b84f0f4 commit 252fa55

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

src/app/component/circular-heatmap/circular-heatmap.component.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,7 @@ export class CircularHeatmapComponent implements OnInit {
174174

175175
toggleTeamSelection(chip: MatChip) {
176176
chip.toggleSelected();
177-
this.filteredTeamView = chip.value;
178-
console.log(this.filteredTeamView);
179-
console.log(this.teamList);
177+
this.filteredTeamView = chip.value.replace(/\s/g, '');
180178

181179
// Update heatmap based on selection
182180
this.reColorHeatmap();
@@ -634,9 +632,18 @@ export class CircularHeatmapComponent implements OnInit {
634632
teamList = this.ALL_CARD_DATA[index]['Task'][i]['teamsImplemented'];
635633
(Object.keys(teamList) as (keyof typeof teamList)[]).forEach(
636634
(key, index) => {
637-
if (teamList[key] === true) {
638-
cntTrue += 1;
635+
if (
636+
this.filteredTeamView === 'All' ||
637+
key === this.filteredTeamView
638+
) {
639+
console.log('Yes');
640+
if (teamList[key] === true) {
641+
cntTrue += 1;
642+
}
643+
} else {
644+
console.log('No');
639645
}
646+
640647
cntAll += 1;
641648
}
642649
);

0 commit comments

Comments
 (0)