diff --git a/ng2-components/ng2-activiti-analytics/src/components/analytics-report-heat-map.component.ts b/ng2-components/ng2-activiti-analytics/src/components/analytics-report-heat-map.component.ts index 7533d6ce6e..718fccb8ea 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/analytics-report-heat-map.component.ts +++ b/ng2-components/ng2-activiti-analytics/src/components/analytics-report-heat-map.component.ts @@ -37,7 +37,7 @@ export class AnalyticsReportHeatMapComponent implements OnInit { field: any = {}; metricForm: FormGroup; - currentMetric: any; + currentMetric: string; constructor(private translate: AlfrescoTranslationService, private analyticsService: AnalyticsService, @@ -50,6 +50,7 @@ export class AnalyticsReportHeatMapComponent implements OnInit { ngOnInit() { this.initForm(); this.field.id = 'metrics'; + this.field.value = 'totalCount'; this.analyticsService.getMetricValues().subscribe( (opts: any[]) => { @@ -80,4 +81,10 @@ export class AnalyticsReportHeatMapComponent implements OnInit { }); } + hasMetric() { + return (this.report.totalCountsPercentages || + this.report.totalTimePercentages || + this.report.avgTimePercentages) ? true : false; + } + }