remove roundDomain for area chart; review date parse

pull/17/head
HardiReady 2017-11-02 13:12:58 +01:00
parent f393b61ca6
commit b1c7c705dd
3 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,6 @@ const WarSchema = new Schema({
}, },
endDate : { endDate : {
type: Date, type: Date,
required: true
}, },
ptBlufor: { ptBlufor: {
type: Number, type: Number,

View File

@ -65,9 +65,9 @@ const parseWarLog = (lineArray, war) => {
if (line.includes('Endbudget')) { if (line.includes('Endbudget')) {
stats.war['endBudgetBlufor'] = transformMoneyString(budg[11]); stats.war['endBudgetBlufor'] = transformMoneyString(budg[11]);
stats.war['endBudgetOpfor'] = transformMoneyString(budg[14]); stats.war['endBudgetOpfor'] = transformMoneyString(budg[14]);
war.endDate = new Date(budg[0].substr(0, budg[0].length - 1).split('/').join('-') + 'T0' + budg[5]); stats.war.endDate = new Date(budg[0].substr(0, budg[0].length - 1).split('/').join('-') + 'T0' + budg[5]);
} else if (line.includes('Startbudget')) {
stats.war.date = new Date(budg[0].substr(0, budg[0].length - 1).split('/').join('-') + 'T22:00:00.000'); stats.war.date = new Date(budg[0].substr(0, budg[0].length - 1).split('/').join('-') + 'T22:00:00.000');
} else if (line.includes('Startbudget')) {
stats.war['budgetBlufor'] = transformMoneyString(budg[11]); stats.war['budgetBlufor'] = transformMoneyString(budg[11]);
stats.war['budgetOpfor'] = transformMoneyString(budg[14]); stats.war['budgetOpfor'] = transformMoneyString(budg[14]);
} else { } else {
@ -182,6 +182,7 @@ const parseWarLog = (lineArray, war) => {
stats.war.playersBlufor = stats.players.filter(player => player.fraction === 'BLUFOR').length; stats.war.playersBlufor = stats.players.filter(player => player.fraction === 'BLUFOR').length;
stats.war.playersOpfor = stats.players.filter(player => player.fraction === 'OPFOR').length; stats.war.playersOpfor = stats.players.filter(player => player.fraction === 'OPFOR').length;
console.log(stats.war);
return stats; return stats;
}; };

View File

@ -227,7 +227,7 @@
[yAxisLabel]="yAxisLabelFlag" [yAxisLabel]="yAxisLabelFlag"
[autoScale]="autoscale" [autoScale]="autoscale"
[timeline]="timeline" [timeline]="timeline"
[roundDomains]="roundDomains"> [roundDomains]="false">
</ngx-charts-area-chart> </ngx-charts-area-chart>
</div> </div>
</tab> </tab>