Skip to content

Commit 7c9291f

Browse files
committed
WIP: Filter team based on heatmap
1 parent 175c558 commit 7c9291f

3 files changed

Lines changed: 36 additions & 3 deletions

File tree

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,13 @@
7474
margin: 0;
7575
padding: 0 1em;
7676
}
77+
.team-filter {
78+
/* padding: 1em; */
79+
padding: 0;
80+
/* margin: 0 2em; */
81+
width: 60%;
82+
/* position: absolute; */
83+
}
84+
.team-filter > .mat-form-field {
85+
display: block;
86+
}

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,20 @@ <h2>Nothing to show</h2>
186186
</ng-template>
187187
</div>
188188
<div id="chart" class="heatmapClass">
189+
<div class="team-filter">
190+
<mat-form-field class="team-chip-list">
191+
<mat-label>TeamList Filter</mat-label>
192+
<mat-chip-list #teams selectable multiple>
193+
<mat-chip
194+
#c="matChip"
195+
*ngFor="let team of filterTeamList"
196+
[value]="team"
197+
selected>
198+
{{ team }}
199+
</mat-chip>
200+
</mat-chip-list>
201+
</mat-form-field>
202+
</div>
189203
<mat-card class="example-card" *ngIf="showTaskCard">
190204
<mat-card-title-group>
191205
<mat-card-title>{{ cardHeader }}</mat-card-title>
@@ -220,6 +234,7 @@ <h2>Nothing to show</h2>
220234
</mat-expansion-panel>
221235
</mat-card-content>
222236
</mat-card>
237+
223238
<button
224239
class="normal-button"
225240
mat-raised-button

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

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ export class CircularHeatmapComponent implements OnInit {
3535
ALL_CARD_DATA: cardSchema[] = [];
3636
radial_labels: string[] = [];
3737
YamlObject: any;
38-
metaData: any;
38+
teamList: any;
39+
filterTeamList: any;
3940
segment_labels: string[] = [];
4041
taskDetails: any;
4142
showOverlay: boolean;
@@ -56,7 +57,14 @@ export class CircularHeatmapComponent implements OnInit {
5657
this.radial_labels.push('Level ' + y);
5758
this.maxLevelOfTasks = y;
5859
}
59-
this.metaData = this.YamlObject;
60+
this.teamList = this.YamlObject['strings']['en']['teams'];
61+
this.filterTeamList = ['All'];
62+
for (let i = 0; i < this.teamList.length; i += 1) {
63+
this.filterTeamList.push(this.teamList[i]);
64+
}
65+
66+
console.log(this.filterTeamList);
67+
// this.filterTeamList = ["All,"...teamList]
6068
});
6169
this.yaml.setURI('./assets/YAML/generated/generated.yaml');
6270
// Function sets data
@@ -114,7 +122,7 @@ export class CircularHeatmapComponent implements OnInit {
114122
allSubDimensionInThisDimension[j]
115123
][allTaskInThisSubDimension[k]]['isImplemented'];
116124
// Create an object from an array from meta data
117-
const teams = this.metaData['strings']['en']['teams'];
125+
const teams = this.teamList;
118126

119127
var teamStatus: { [key: string]: boolean } = {};
120128

0 commit comments

Comments
 (0)