From 14901883e6825544b4af529811734e3c29691935 Mon Sep 17 00:00:00 2001 From: HardiReady Date: Wed, 18 Jul 2018 20:05:06 +0200 Subject: [PATCH] Distinct all time overview vs campaign overview --- .../statistic/campaign/overview/stats-overview.component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/static/src/app/statistic/campaign/overview/stats-overview.component.ts b/static/src/app/statistic/campaign/overview/stats-overview.component.ts index decfe16..1de0d3a 100644 --- a/static/src/app/statistic/campaign/overview/stats-overview.component.ts +++ b/static/src/app/statistic/campaign/overview/stats-overview.component.ts @@ -36,7 +36,7 @@ export class StatisticOverviewComponent implements OnInit { showYAxisLabel = true; yAxisLabel = ''; autoscale = true; - timeline = true; + timeline = false; constructor(private route: ActivatedRoute, private campaignService: CampaignService) { @@ -66,6 +66,7 @@ export class StatisticOverviewComponent implements OnInit { itemsProcessed++; if (itemsProcessed === campaigns.length) { if (this.id === 'all') { + this.timeline = true; this.title = 'Gesamtübersicht'; wars.sort((a, b) => { // sort by dates, because older campaign can contain newer war @@ -110,7 +111,7 @@ export class StatisticOverviewComponent implements OnInit { for (let i = wars.length - 1; i >= 0; i--) { const j = wars.length - i - 1; - const warDate = new Date(wars[i].date); + const warDate = (this.id === 'all') ? new Date(wars[i].date) : ChartUtils.getShortDateString(wars[i].date); pointsObj[0].series.push({ name: warDate,