Skip to content

Commit 31f55de

Browse files
committed
Simplify AddSegmentLabels()
1 parent 568a4ba commit 31f55de

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

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

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -236,14 +236,10 @@ export class CircularHeatmapComponent implements OnInit {
236236
return undefined;
237237
}
238238

239-
private AddSegmentLabels(allDimensionNames: string[]) {
240-
console.log(allDimensionNames);
241-
for (var i = 0; i < allDimensionNames.length; i++) {
242-
var allSubDimensionInThisDimension = Object.keys(
243-
this.YamlObject[allDimensionNames[i]]
244-
);
245-
for (var j = 0; j < allSubDimensionInThisDimension.length; j++) {
246-
this.segment_labels.push(allSubDimensionInThisDimension[j]);
239+
private AddSegmentLabels(yampObject: any[]) {
240+
for (let dim in yampObject) {
241+
for (let subdim in yampObject[dim]) {
242+
this.segment_labels.push(subdim);
247243
}
248244
}
249245
console.log(this.segment_labels);

0 commit comments

Comments
 (0)