Distinct all time overview vs campaign overview

pull/43/head
HardiReady 2018-07-18 20:05:06 +02:00
parent 2b824bac7c
commit 14901883e6
1 changed files with 3 additions and 2 deletions

View File

@ -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,