Add player count graph print in FE

pull/51/head
HardiReady 2019-02-09 12:07:09 +01:00
parent 2538f1838a
commit f34a748d7f
1 changed files with 8 additions and 2 deletions

View File

@ -382,13 +382,18 @@ export class FractionStatsComponent implements OnInit, OnChanges {
this.initialized.transport = true;
}
initPlayerCountData() {
if (this.initialized.playerCount) {
return;
}
this.addFinalTimeData(this.tmpPlayerCountData);
this.logData.playerCount.forEach(playerCountEntry => {
this.tmpPlayerCountData[0].series.push(
ChartUtils.getSeriesEntry(new Date(playerCountEntry.time), playerCountEntry.countBlufor));
this.tmpPlayerCountData[1].series.push(
ChartUtils.getSeriesEntry(new Date(playerCountEntry.time), playerCountEntry.countOpfor));
});
this.initialized.playerCount = true;
this.addFinalTimeData(this.tmpPlayerCountData);
}
initFlagHoldData() {
@ -431,6 +436,7 @@ export class FractionStatsComponent implements OnInit, OnChanges {
this.tmpReviveData = ChartUtils.getMultiDataArray(Fraction.BLUFOR, Fraction.OPFOR);
this.tmpStabilizeData = ChartUtils.getMultiDataArray(Fraction.BLUFOR, Fraction.OPFOR);
this.tmpFlagCaptureData = ChartUtils.getMultiDataArray(Fraction.BLUFOR, Fraction.OPFOR);
this.tmpPlayerCountData = ChartUtils.getMultiDataArray(Fraction.BLUFOR, Fraction.OPFOR);
[this.tmpKillData, this.tmpFrienlyFireData, this.tmpVehicleData, this.tmpReviveData, this.tmpStabilizeData,
this.tmpTransportData].forEach(tmp => {