remove roundDomain for area chart; review date parse
parent
f393b61ca6
commit
b1c7c705dd
|
@ -13,7 +13,6 @@ const WarSchema = new Schema({
|
||||||
},
|
},
|
||||||
endDate : {
|
endDate : {
|
||||||
type: Date,
|
type: Date,
|
||||||
required: true
|
|
||||||
},
|
},
|
||||||
ptBlufor: {
|
ptBlufor: {
|
||||||
type: Number,
|
type: Number,
|
||||||
|
|
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue