changed x to just be incrmeenetal, added a label

This commit is contained in:
Michael Simard
2020-06-20 13:17:26 -05:00
parent 00ddf6167c
commit 4964b44f1d
2 changed files with 28 additions and 11 deletions

View File

@@ -14,10 +14,12 @@ import Vapor
struct DataPoint : Content {
var x:Double
var y:Double
var label:String
init(x:Double, y:Double) {
init(x:Double, y:Double, label:String) {
self.x = x
self.y = y
self.label = label
}
}
@@ -27,13 +29,14 @@ final class AllStats: Content {
var byMonth: [MonthStats]
var highestWinLossRatio:String
var dataPoints:[DataPoint]
var mostRecentRecord:String
init( overall:Stats, byMonth:[MonthStats], highestWinLossRatio:String, dataPoints:[DataPoint]) {
init( overall:Stats, byMonth:[MonthStats], highestWinLossRatio:String, dataPoints:[DataPoint], mostRecentRecord:String) {
self.overall = overall
self.byMonth = byMonth
self.highestWinLossRatio = highestWinLossRatio
self.dataPoints = dataPoints
self.mostRecentRecord = mostRecentRecord
}
}