Distinct all time overview vs campaign overview
parent
2b824bac7c
commit
14901883e6
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue