Real date as label
This commit is contained in:
@@ -377,7 +377,9 @@ struct StatsController: RouteCollection {
|
|||||||
let date = self.createDate(day: first.day, month: first.month, year: first.year, hour: first.hour + 6, minute:first.minute) // 6 hours to make sure we pick a time that isnt on borders of us time zones
|
let date = self.createDate(day: first.day, month: first.month, year: first.year, hour: first.hour + 6, minute:first.minute) // 6 hours to make sure we pick a time that isnt on borders of us time zones
|
||||||
print ("p \(date.timeIntervalSince1970)")
|
print ("p \(date.timeIntervalSince1970)")
|
||||||
let x = Double(cumulativeWinLossRatios.count)
|
let x = Double(cumulativeWinLossRatios.count)
|
||||||
cumulativeWinLossRatios.append(DataPoint(x:x , y: (totalWins/totalLosses).truncate(places: 2), label:"\(date.timeIntervalSince1970*1000)"))
|
|
||||||
|
let d = Date(timeIntervalSince1970: date.timeIntervalSince1970)
|
||||||
|
cumulativeWinLossRatios.append(DataPoint(x:x , y: (totalWins/totalLosses).truncate(places: 2), label:("\(Utilities.monthToString(month: d.month)) \(d.day)")))
|
||||||
}
|
}
|
||||||
allDailyStats.append(DailyStats(day: first.day, month: first.month, year: first.year, stats: stats, cumulativeRatio: self.getRatio(num: totalWins, den: totalLosses)))
|
allDailyStats.append(DailyStats(day: first.day, month: first.month, year: first.year, stats: stats, cumulativeRatio: self.getRatio(num: totalWins, den: totalLosses)))
|
||||||
return getRatios(remaining, allDailyStats:&allDailyStats, cumulativeWinLossRatios:&cumulativeWinLossRatios, eventLoop: eventLoop)
|
return getRatios(remaining, allDailyStats:&allDailyStats, cumulativeWinLossRatios:&cumulativeWinLossRatios, eventLoop: eventLoop)
|
||||||
|
|||||||
Reference in New Issue
Block a user