Skip to content

Commit 49a95aa

Browse files
committed
Renaming dataset functions and maxLevelOfMaturity
1 parent fd922e8 commit 49a95aa

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

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

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ type ProjectData = {
4141
})
4242
export class CircularHeatmapComponent implements OnInit {
4343
Routing: string = '/activity-description';
44-
maxLevelOfActivities: number = -1;
44+
maxLevelOfMaturity: number = -1;
4545
showActivityCard: boolean = false;
4646
cardHeader: string = '';
4747
cardSubheader: string = '';
@@ -95,7 +95,7 @@ export class CircularHeatmapComponent implements OnInit {
9595

9696
// Initialize the card array
9797
let segmentTotalCount = this.segment_labels.length;
98-
let cardTotalCount = segmentTotalCount * this.maxLevelOfActivities;
98+
let cardTotalCount = segmentTotalCount * this.maxLevelOfMaturity;
9999
this.ALL_CARD_DATA = new Array(cardTotalCount).fill(null);
100100

101101
// Process each card / sector
@@ -112,7 +112,7 @@ export class CircularHeatmapComponent implements OnInit {
112112

113113
for (
114114
let level: number = 1;
115-
level <= this.maxLevelOfActivities;
115+
level <= this.maxLevelOfMaturity;
116116
level++
117117
) {
118118
// Create and store each card (with activities for that level)
@@ -257,7 +257,7 @@ export class CircularHeatmapComponent implements OnInit {
257257
for (let x in this.YamlObject['strings']['en']['maturity_levels']) {
258258
var y = parseInt(x) + 1;
259259
this.radial_labels.push('Level ' + y);
260-
this.maxLevelOfActivities = y;
260+
this.maxLevelOfMaturity = y;
261261
}
262262
resolve();
263263
});
@@ -354,7 +354,7 @@ export class CircularHeatmapComponent implements OnInit {
354354
teamKey
355355
];
356356

357-
this.saveState();
357+
this.saveDataset();
358358
this.reColorHeatmap();
359359
}
360360

@@ -449,7 +449,6 @@ export class CircularHeatmapComponent implements OnInit {
449449
_self.activityData = curr.Activity;
450450
_self.cardHeader = curr.SubDimension;
451451
_self.showActivityCard = true;
452-
//console.log(_self.activityData)
453452
})
454453
.on('mouseover', function (d) {
455454
//console.log(d.toElement.__data__.Name)
@@ -797,14 +796,14 @@ export class CircularHeatmapComponent implements OnInit {
797796

798797
ResetIsImplemented() {
799798
localStorage.removeItem('dataset');
800-
this.loadState();
799+
this.loadDataset();
801800
}
802801

803-
saveState() {
802+
saveDataset() {
804803
localStorage.setItem('dataset', JSON.stringify(this.ALL_CARD_DATA));
805804
}
806805

807-
loadState() {
806+
loadDataset() {
808807
var content = this.getDatasetFromBrowserStorage();
809808
if (content != null) {
810809
this.ALL_CARD_DATA = content;

0 commit comments

Comments
 (0)