mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Analytics - Improve look and feel and user experience (#1585)
* #1583 Improve look and feel and user experience * #1583 Add layoutType property to report list Improve unit test Improve docs * #1583 Review changes
This commit is contained in:
committed by
Mario Romano
parent
6431d7c04f
commit
30b4db8161
@@ -44,6 +44,7 @@ export class AnalyticsGeneratorComponent implements OnChanges {
|
||||
reports: Chart[];
|
||||
|
||||
showDetails: boolean = false;
|
||||
currentChartPosition: number;
|
||||
|
||||
public barChartOptions: any = {
|
||||
responsive: true,
|
||||
@@ -83,6 +84,9 @@ export class AnalyticsGeneratorComponent implements OnChanges {
|
||||
this.analyticsService.getReportsByParams(reportId, reportParamQuery).subscribe(
|
||||
(res: Chart[]) => {
|
||||
this.reports = res;
|
||||
if (this.reports) {
|
||||
this.selectFirstReport();
|
||||
}
|
||||
this.onSuccess.emit(res);
|
||||
},
|
||||
(err: any) => {
|
||||
@@ -116,4 +120,16 @@ export class AnalyticsGeneratorComponent implements OnChanges {
|
||||
isShowDetails(): boolean {
|
||||
return this.showDetails;
|
||||
}
|
||||
|
||||
isCurrent(position: number) {
|
||||
return position === this.currentChartPosition ? true : false;
|
||||
}
|
||||
|
||||
selectCurrent(position: number) {
|
||||
this.currentChartPosition = position;
|
||||
}
|
||||
|
||||
selectFirstReport() {
|
||||
this.selectCurrent(0);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user