diff --git a/webapp/src/app/modules/dashboard/dashboard.component.ts b/webapp/src/app/modules/dashboard/dashboard.component.ts index cb9982c5..d1e70970 100644 --- a/webapp/src/app/modules/dashboard/dashboard.component.ts +++ b/webapp/src/app/modules/dashboard/dashboard.component.ts @@ -108,7 +108,7 @@ export class DashboardComponent implements OnInit { readonly topicTreemapMinYear = 1900; readonly topicTreemapMaxYear = new Date().getFullYear(); dashboardPeriodMode: DashboardPeriodMode = 'all_time'; - dashboardFromYear = this.topicTreemapMaxYear - 4; + dashboardFromYear = this.topicTreemapMinYear; dashboardToYear = this.topicTreemapMaxYear; selectedTopicTreemapNode?: string; selectedDfgTopicTreemapNode?: string; @@ -406,14 +406,16 @@ export class DashboardComponent implements OnInit { this.dashboardPeriodMode = mode; } this.applyPresetPeriod(); - this.dashboardFromYear = this.parseDashboardYear( - params.get('fromYear'), - this.dashboardFromYear, - ); - this.dashboardToYear = this.parseDashboardYear( - params.get('toYear'), - this.dashboardToYear, - ); + if (this.dashboardPeriodMode !== 'all_time') { + this.dashboardFromYear = this.parseDashboardYear( + params.get('fromYear'), + this.dashboardFromYear, + ); + this.dashboardToYear = this.parseDashboardYear( + params.get('toYear'), + this.dashboardToYear, + ); + } if (this.dashboardFromYear > this.dashboardToYear) { this.dashboardFromYear = this.dashboardToYear; } @@ -422,7 +424,10 @@ export class DashboardComponent implements OnInit { private applyPresetPeriod(): void { const currentYear = this.topicTreemapMaxYear; - if (this.dashboardPeriodMode === 'last_10_years') { + if (this.dashboardPeriodMode === 'all_time') { + this.dashboardFromYear = this.topicTreemapMinYear; + this.dashboardToYear = currentYear; + } else if (this.dashboardPeriodMode === 'last_10_years') { this.dashboardFromYear = currentYear - 9; this.dashboardToYear = currentYear; } else if (this.dashboardPeriodMode === 'last_5_years') {