Update for 2021 infography

master
Laurent 4 years ago
parent 1bc0a6dd32
commit 23eded127b
  1. 8
      TournamentStats.xcodeproj/project.pbxproj
  2. 26
      TournamentStats/AppDelegate.swift
  3. 57
      TournamentStats/UI/Fonts.swift
  4. 44
      TournamentStats/UI/components/BarChart.swift
  5. 2
      TournamentStats/UI/components/DataSourceWrapper.swift
  6. 2
      TournamentStats/UI/components/Label.swift
  7. 4
      TournamentStats/UI/components/PieChart.swift
  8. 6
      TournamentStats/UI/components/TableView.swift
  9. 15
      TournamentStats/UI/components/TitleLabel.swift
  10. 54
      TournamentStats/UI/reports/InfographyView.swift
  11. 324
      TournamentStats/UI/reports/InfographyView.xib
  12. 5
      TournamentStats/realm/Model.swift
  13. 17
      TournamentStats/report/Queries.swift
  14. 8
      TournamentStats/report/ReportGenerator.swift
  15. 6
      TournamentStats/report/structures/CountryCounter.swift
  16. 9
      TournamentStats/report/structures/CumulatedResults.swift
  17. 4
      TournamentStats/report/structures/FestivalStats.swift
  18. 19
      TournamentStats/report/structures/PlayerNotableFinishes.swift
  19. 5
      TournamentStats/report/structures/TournamentCounter.swift
  20. 6
      TournamentStats/report/structures/TournamentStats.swift
  21. 185
      TournamentStats/scrapper/Downloader.swift
  22. 60
      TournamentStats/utils/ColumnRepresentable.swift
  23. 8
      TournamentStats/utils/Game.swift

@ -144,6 +144,7 @@
4DF78DD122F9AADF00C02F73 /* TableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DF78DD022F9AADF00C02F73 /* TableView.swift */; }; 4DF78DD122F9AADF00C02F73 /* TableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DF78DD022F9AADF00C02F73 /* TableView.swift */; };
4DF78DD422F9C85C00C02F73 /* UIColor+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DF78DD322F9C85C00C02F73 /* UIColor+Extensions.swift */; }; 4DF78DD422F9C85C00C02F73 /* UIColor+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DF78DD322F9C85C00C02F73 /* UIColor+Extensions.swift */; };
4DF78DD622F9CE7E00C02F73 /* TitleLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DF78DD522F9CE7E00C02F73 /* TitleLabel.swift */; }; 4DF78DD622F9CE7E00C02F73 /* TitleLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DF78DD522F9CE7E00C02F73 /* TitleLabel.swift */; };
C4408391275760E800A68675 /* BarChart.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4408390275760E800A68675 /* BarChart.swift */; };
FFE9052C22BB7313006FEFA4 /* event34 in Resources */ = {isa = PBXBuildFile; fileRef = FFE9052922BB7312006FEFA4 /* event34 */; }; FFE9052C22BB7313006FEFA4 /* event34 in Resources */ = {isa = PBXBuildFile; fileRef = FFE9052922BB7312006FEFA4 /* event34 */; };
FFE9052D22BB7313006FEFA4 /* event41 in Resources */ = {isa = PBXBuildFile; fileRef = FFE9052A22BB7312006FEFA4 /* event41 */; }; FFE9052D22BB7313006FEFA4 /* event41 in Resources */ = {isa = PBXBuildFile; fileRef = FFE9052A22BB7312006FEFA4 /* event41 */; };
FFE9052E22BB7313006FEFA4 /* event40 in Resources */ = {isa = PBXBuildFile; fileRef = FFE9052B22BB7313006FEFA4 /* event40 */; }; FFE9052E22BB7313006FEFA4 /* event40 in Resources */ = {isa = PBXBuildFile; fileRef = FFE9052B22BB7313006FEFA4 /* event40 */; };
@ -298,6 +299,7 @@
4DF78DD022F9AADF00C02F73 /* TableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableView.swift; sourceTree = "<group>"; }; 4DF78DD022F9AADF00C02F73 /* TableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableView.swift; sourceTree = "<group>"; };
4DF78DD322F9C85C00C02F73 /* UIColor+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+Extensions.swift"; sourceTree = "<group>"; }; 4DF78DD322F9C85C00C02F73 /* UIColor+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+Extensions.swift"; sourceTree = "<group>"; };
4DF78DD522F9CE7E00C02F73 /* TitleLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TitleLabel.swift; sourceTree = "<group>"; }; 4DF78DD522F9CE7E00C02F73 /* TitleLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TitleLabel.swift; sourceTree = "<group>"; };
C4408390275760E800A68675 /* BarChart.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BarChart.swift; sourceTree = "<group>"; };
FFE9052922BB7312006FEFA4 /* event34 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = event34; sourceTree = "<group>"; }; FFE9052922BB7312006FEFA4 /* event34 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = event34; sourceTree = "<group>"; };
FFE9052A22BB7312006FEFA4 /* event41 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = event41; sourceTree = "<group>"; }; FFE9052A22BB7312006FEFA4 /* event41 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = event41; sourceTree = "<group>"; };
FFE9052B22BB7313006FEFA4 /* event40 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = event40; sourceTree = "<group>"; }; FFE9052B22BB7313006FEFA4 /* event40 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = event40; sourceTree = "<group>"; };
@ -574,11 +576,12 @@
4DF78DCF22F9AA9300C02F73 /* components */ = { 4DF78DCF22F9AA9300C02F73 /* components */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
C4408390275760E800A68675 /* BarChart.swift */,
4D39B6F222F8549100625E31 /* DataSourceWrapper.swift */,
4DB113DA230559F600D0C671 /* Label.swift */,
4DF78DCD22F9AA3F00C02F73 /* PieChart.swift */, 4DF78DCD22F9AA3F00C02F73 /* PieChart.swift */,
4DF78DD022F9AADF00C02F73 /* TableView.swift */, 4DF78DD022F9AADF00C02F73 /* TableView.swift */,
4D39B6F222F8549100625E31 /* DataSourceWrapper.swift */,
4DF78DD522F9CE7E00C02F73 /* TitleLabel.swift */, 4DF78DD522F9CE7E00C02F73 /* TitleLabel.swift */,
4DB113DA230559F600D0C671 /* Label.swift */,
); );
path = components; path = components;
sourceTree = "<group>"; sourceTree = "<group>";
@ -810,6 +813,7 @@
4DD9C5BD2316D092003501A4 /* PlayerNotableFinishes.swift in Sources */, 4DD9C5BD2316D092003501A4 /* PlayerNotableFinishes.swift in Sources */,
4DDEF11422AE4FB900F4D7C1 /* TournamentStats.swift in Sources */, 4DDEF11422AE4FB900F4D7C1 /* TournamentStats.swift in Sources */,
4DF760A722A3FD12004B0EF1 /* Model.swift in Sources */, 4DF760A722A3FD12004B0EF1 /* Model.swift in Sources */,
C4408391275760E800A68675 /* BarChart.swift in Sources */,
4D39B6FC22F8686300625E31 /* CumulatedWins.swift in Sources */, 4D39B6FC22F8686300625E31 /* CumulatedWins.swift in Sources */,
4DF7614F22A6CF93004B0EF1 /* PlayerResult.swift in Sources */, 4DF7614F22A6CF93004B0EF1 /* PlayerResult.swift in Sources */,
4D39B6F722F8573900625E31 /* StackTableCell.swift in Sources */, 4D39B6F722F8573900625E31 /* StackTableCell.swift in Sources */,

@ -17,13 +17,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// for fontFamilyName in UIFont.familyNames { for fontFamilyName in UIFont.familyNames {
// print("family: \(fontFamilyName)\n") print("family: \(fontFamilyName)\n")
//
// for fontName in UIFont.fontNames(forFamilyName: fontFamilyName) { for fontName in UIFont.fontNames(forFamilyName: fontFamilyName) {
// print("font: \(fontName)") print("font: \(fontName)")
// } }
// } }
// UI stuff // UI stuff
let splitViewController = window!.rootViewController as! UISplitViewController let splitViewController = window!.rootViewController as! UISplitViewController
@ -39,16 +39,18 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
// launchReports() // launchReports()
let realm = try! Realm() // let realm = try! Realm()
try! realm.write { // try! realm.write {
realm.deleteAll() // realm.deleteAll()
} // }
Downloader.downloadWSOPResults() // Downloader.downloadWSOPResults()
let generator = ReportGenerator() let generator = ReportGenerator()
generator.generate() generator.generate()
InfographyView.generate(generator)
let documentsPath = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0] let documentsPath = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0]
print("documents = \(documentsPath)") print("documents = \(documentsPath)")

@ -11,22 +11,55 @@ import UIKit
class Fonts { class Fonts {
fileprivate enum FontName : String { fileprivate enum FontName {
case regular = "Menlo-Regular" case graph
case bold = "Menlo-Bold" case regular
case bold
var name: String {
switch self {
case .graph:
return "Menlo-Bold"
case .regular:
return "HelveticaNeue"
case .bold:
return "HelveticaNeue-Bold"
}
}
} }
static let monospaced: UIFont = UIFont(name: FontName.regular.rawValue, size: 18.0)! static let color: UIColor = UIColor.white
static let bigNumbers: UIFont = UIFont(name: FontName.regular.rawValue, size: 48.0)! static let titleColor: UIColor = UIColor.white //UIColor(r: 31, g: 222, b: 255, a: 1.0)
static let graphTextColor: UIColor = UIColor(white: 0.8, alpha: 1.0)
static var monospaced: UIFont { return Fonts.monospaced(size: 18) }
static var bigNumbers: UIFont { return Fonts.monospaced(size: 48) }
static let graph: UIFont = UIFont(name: FontName.graph.name, size: 18.0)!
static let small: UIFont = UIFont(name: FontName.regular.name, size: 16.0)!
static let regular: UIFont = UIFont(name: FontName.regular.name, size: 18.0)!
static let bold: UIFont = UIFont(name: FontName.bold.name, size: 18.0)!
static let regular: UIFont = UIFont(name: FontName.regular.rawValue, size: 18.0)! static let mainTitle: UIFont = UIFont(name: FontName.bold.name, size: 72.0)!
static let bold: UIFont = UIFont(name: FontName.bold.rawValue, size: 18.0)! static let title: UIFont = UIFont(name: FontName.bold.name, size: 36.0)!
static let subTitle: UIFont = UIFont(name: FontName.regular.name, size: 28.0)!
static let cellTitle: UIFont = UIFont(name: FontName.regular.name, size: 20.0)!
static let mainTitle: UIFont = UIFont(name: FontName.regular.rawValue, size: 72.0)! static let chartEntries: UIFont = UIFont(name: FontName.bold.name, size: 28.0)!
static let subTitle: UIFont = UIFont(name: FontName.regular.rawValue, size: 28.0)! static let chartLegend: UIFont = UIFont(name: FontName.regular.name, size: 18.0)!
static let cellTitle: UIFont = UIFont(name: FontName.regular.rawValue, size: 20.0)!
static let pieChartEntries: UIFont = UIFont(name: FontName.bold.rawValue, size: 28.0)! fileprivate static func monospaced(size: CGFloat = 18.0, weight: UIFont.Weight = .regular) -> UIFont {
static let chartLegend: UIFont = UIFont(name: FontName.regular.rawValue, size: 18.0)! // let features = [
[
UIFontDescriptor.FeatureKey.featureIdentifier: kNumberSpacingType,
UIFontDescriptor.FeatureKey.typeIdentifier: kMonospacedNumbersSelector
]
]
let fontDescriptor = UIFont.systemFont(ofSize: size, weight: weight).fontDescriptor.addingAttributes(
[UIFontDescriptor.AttributeName.featureSettings: features]
)
return UIFont(descriptor: fontDescriptor, size: size)
}
} }

@ -0,0 +1,44 @@
//
// BarChart.swift
// TournamentStats
//
// Created by Laurent Morvillier on 01/12/2021.
// Copyright © 2021 Stax River. All rights reserved.
//
import Foundation
import UIKit
import Charts
class BarChart : BarChartView {
override init(frame: CGRect) {
super.init(frame: frame)
self.leftAxis.labelTextColor = Fonts.graphTextColor
self.leftAxis.labelFont = Fonts.graph
self.leftAxis.drawGridLinesEnabled = false
self.leftAxis.drawZeroLineEnabled = true
self.leftAxis.axisMinimum = 0.0
self.xAxis.drawGridLinesEnabled = false
self.xAxis.drawAxisLineEnabled = false
self.xAxis.granularity = 1
self.xAxis.labelTextColor = Fonts.graphTextColor
self.xAxis.labelFont = Fonts.graph
self.xAxis.labelPosition = .bottom
self.rightAxis.enabled = false
self.legend.enabled = false
}
func setXAxisLabels(_ labels: [String]) {
self.xAxis.valueFormatter = IndexAxisValueFormatter(values: labels)
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}

@ -77,7 +77,7 @@ class DataSourceWrapper<T : ColumnRepresentable> : NSObject, UITableViewDataSour
labelContainer.widthAnchor.constraint(equalTo: cell.contentView.widthAnchor, multiplier: multiplier).isActive = true labelContainer.widthAnchor.constraint(equalTo: cell.contentView.widthAnchor, multiplier: multiplier).isActive = true
let label: UILabel = UILabel(frame: CGRect.zero) let label: UILabel = UILabel(frame: CGRect.zero)
label.textColor = UIColor.white label.textColor = Fonts.color
label.backgroundColor = UIColor.clear label.backgroundColor = UIColor.clear
label.text = value label.text = value
label.font = font label.font = font

@ -17,7 +17,7 @@ class Label: UILabel {
} }
fileprivate func _initialize() { fileprivate func _initialize() {
self.textColor = UIColor.white self.textColor = Fonts.color
self.font = Fonts.subTitle self.font = Fonts.subTitle
} }

@ -15,8 +15,6 @@ class PieChart : PieChartView {
override init(frame: CGRect) { override init(frame: CGRect) {
super.init(frame: frame) super.init(frame: frame)
// self.backgroundColor = UIColor.gray
self.holeColor = UIColor.clear self.holeColor = UIColor.clear
self.usePercentValuesEnabled = true self.usePercentValuesEnabled = true
self.minOffset = 16.0 self.minOffset = 16.0
@ -24,7 +22,7 @@ class PieChart : PieChartView {
self.drawEntryLabelsEnabled = false self.drawEntryLabelsEnabled = false
self.transparentCircleRadiusPercent = 0 self.transparentCircleRadiusPercent = 0
self.legend.textColor = UIColor.white self.legend.textColor = Fonts.graphTextColor
self.legend.font = Fonts.chartLegend self.legend.font = Fonts.chartLegend
self.legend.orientation = .vertical self.legend.orientation = .vertical
self.legend.form = .circle self.legend.form = .circle

@ -25,7 +25,7 @@ class TableView : UITableView {
private func label(height: CGFloat, text: String) -> UILabel { private func label(height: CGFloat, text: String) -> UILabel {
let label = UILabel(frame: CGRect(x: 0, y: 0, width: self.frame.width, height: height)) let label = UILabel(frame: CGRect(x: 0, y: 0, width: self.frame.width, height: height))
label.text = text label.text = text
label.textColor = UIColor.white label.textColor = Fonts.color
label.backgroundColor = UIColor.clear label.backgroundColor = UIColor.clear
label.textAlignment = .center label.textAlignment = .center
label.font = Fonts.regular label.font = Fonts.regular
@ -35,7 +35,8 @@ class TableView : UITableView {
func setHeader(header: String) { func setHeader(header: String) {
let label = self.label(height: 60.0, text: header) let label = self.label(height: 60.0, text: header)
label.textAlignment = .left label.textAlignment = .left
label.font = Fonts.subTitle label.font = Fonts.title
label.textColor = Fonts.titleColor
self.tableHeaderView = label self.tableHeaderView = label
} }
@ -58,6 +59,7 @@ class TableView : UITableView {
self.register(UINib(nibName: "StackTableCell", bundle: Bundle.main), forCellReuseIdentifier: "Cell") self.register(UINib(nibName: "StackTableCell", bundle: Bundle.main), forCellReuseIdentifier: "Cell")
self.backgroundColor = UIColor.clear self.backgroundColor = UIColor.clear
self.separatorColor = UIColor.lightGray
} }

@ -13,14 +13,19 @@ class TitleLabel : UILabel {
init(frame: CGRect, text: String) { init(frame: CGRect, text: String) {
super.init(frame: frame) super.init(frame: frame)
self.textColor = UIColor.white self._configure()
self.text = text
self.textAlignment = .center
self.font = UIFont.boldSystemFont(ofSize: 16.0)
} }
required init?(coder aDecoder: NSCoder) { required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented") super.init(coder: aDecoder)
self._configure()
}
fileprivate func _configure() {
self.textColor = Fonts.titleColor
self.text = text
self.textAlignment = .left
self.font = Fonts.title
} }
} }

@ -100,8 +100,7 @@ class InfographyView: UIView {
} }
fileprivate func _createBackground() { fileprivate func _createBackground() {
let startColor = UIColor(red: 23/255, green: 72/255, blue: 61/255, alpha: 1) self.backgroundColor = UIColor(r: 8, g: 54, b: 63, a: 1)
self.backgroundColor = startColor
} }
fileprivate func _fillView() { fileprivate func _fillView() {
@ -110,8 +109,8 @@ class InfographyView: UIView {
return return
} }
self.infographyTitle.text = "2019 World Series of Poker" self.infographyTitle.text = "2021 World Series of Poker"
self.infographyTitle.textColor = UIColor.white self.infographyTitle.textColor = Fonts.color
self.infographyTitle.font = Fonts.mainTitle self.infographyTitle.font = Fonts.mainTitle
self.collectionView.register(UINib(nibName: "StatCollectionViewCell", bundle: Bundle.main), forCellWithReuseIdentifier: "Stat") self.collectionView.register(UINib(nibName: "StatCollectionViewCell", bundle: Bundle.main), forCellWithReuseIdentifier: "Stat")
@ -134,22 +133,24 @@ class InfographyView: UIView {
self.tableView12.setData(data: generator.mostCashes, maxRows: 5) self.tableView12.setData(data: generator.mostCashes, maxRows: 5)
self.tableView12.setHeader(header: "Most cashes") self.tableView12.setHeader(header: "Most cashes")
self.tableView13.setData(data: generator.averageCash, maxRows: 5) self.tableView13.setData(data: generator.averageCash.results, maxRows: 5)
self.tableView13.setHeader(header: "Best average cash (8+)") self.tableView13.setHeader(header: "Best average cash (\(generator.averageCash.minimumCashes)+)")
///// /////
self.label21.text = "Buy-in distribution" self.label21.text = "Buy-in distribution"
self.label22.text = "First prizes distribution" self.label22.text = "First prizes distribution"
let pieChartFrame = CGRect(x: 0, y: 0, width: 650, height: 500) let barChartFrame = CGRect(x: 0, y: 0, width: 650, height: 500)
let buyinDistribPie = PieChart(frame: pieChartFrame) let buyinDistribBarChart = BarChart(frame: barChartFrame)
buyinDistribPie.data = generator.tournamentBuyinDistribution.pieChartData buyinDistribBarChart.data = generator.tournamentBuyinDistribution.barChartData
self.container21.addSubview(buyinDistribPie) buyinDistribBarChart.setXAxisLabels(generator.tournamentBuyinDistribution.labels)
self.container21.addSubview(buyinDistribBarChart)
let firstPrizeDistributionPie = PieChart(frame: pieChartFrame) let firstPrizeDistributionBarChart = BarChart(frame: barChartFrame)
firstPrizeDistributionPie.data = generator.firstPrizeDistribution.pieChartData firstPrizeDistributionBarChart.data = generator.firstPrizeDistribution.barChartData
self.container22.addSubview(firstPrizeDistributionPie) firstPrizeDistributionBarChart.setXAxisLabels(generator.firstPrizeDistribution.labels)
self.container22.addSubview(firstPrizeDistributionBarChart)
///// /////
@ -163,26 +164,29 @@ class InfographyView: UIView {
self.label41.text = "USA vs. World bracelets" self.label41.text = "USA vs. World bracelets"
self.label42.text = "Games distribution" self.label42.text = "Games distribution"
let USABraceletsDistribPie = PieChart(frame: pieChartFrame) let USABraceletsDistribBarChart = BarChart(frame: barChartFrame)
USABraceletsDistribPie.data = generator.USAvsWorldWins.pieChartData USABraceletsDistribBarChart.data = generator.USAvsWorldWins.barChartData
self.container41.addSubview(USABraceletsDistribPie) USABraceletsDistribBarChart.setXAxisLabels(generator.USAvsWorldWins.labels)
self.container41.addMaxConstraints(view: USABraceletsDistribPie) self.container41.addSubview(USABraceletsDistribBarChart)
self.container41.addMaxConstraints(view: USABraceletsDistribBarChart)
let holdemDistributionPie = PieChart(frame: pieChartFrame) let holdemDistributionBarChart = BarChart(frame: barChartFrame)
holdemDistributionPie.data = generator.gamesDistribution.pieChartData holdemDistributionBarChart.data = generator.gamesDistribution.barChartData
self.container42.addSubview(holdemDistributionPie) holdemDistributionBarChart.setXAxisLabels(generator.gamesDistribution.labels)
self.container42.addMaxConstraints(view: holdemDistributionPie) self.container42.addSubview(holdemDistributionBarChart)
self.container42.addMaxConstraints(view: holdemDistributionBarChart)
self.label51.text = "Average event" self.label51.text = "Average event"
let ds = generator.averageEvent.first let ds: TournamentStats? = generator.averageEvent.first
self.collectionView51.register(UINib(nibName: "StatCollectionViewCell", bundle: Bundle.main), forCellWithReuseIdentifier: "Stat") self.collectionView51.register(UINib(nibName: "StatCollectionViewCell", bundle: Bundle.main), forCellWithReuseIdentifier: "Stat")
self.collectionView51.dataSource = ds self.collectionView51.dataSource = ds
self.collectionView51.delegate = ds self.collectionView51.delegate = ds
self.labelTableSize.text = "No-Limit Hold'em table sizes" self.labelTableSize.text = "No-Limit Hold'em table sizes"
let tableSizeDistributionPie = PieChart(frame: pieChartFrame) let tableSizeDistributionBarChart = BarChart(frame: barChartFrame)
tableSizeDistributionPie.data = generator.tableSizeDistribution.pieChartData tableSizeDistributionBarChart.data = generator.tableSizeDistribution.barChartData
self.containerTableSize.addSubview(tableSizeDistributionPie) tableSizeDistributionBarChart.setXAxisLabels(generator.tableSizeDistribution.labels)
self.containerTableSize.addSubview(tableSizeDistributionBarChart)
} }
} }

@ -1,23 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19455" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait"> <device id="retina6_1" orientation="portrait" appearance="light"/>
<adaptation id="fullscreen"/>
</device>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19454"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<objects> <objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="InfographyView" customModule="TournamentStats" customModuleProvider="target"> <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="InfographyView" customModule="TournamentStats" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="1500" height="4100"/> <rect key="frame" x="0.0" y="0.0" width="1500" height="4200"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="w79-xx-Evx"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="w79-xx-Evx">
<rect key="frame" x="100" y="44" width="1300" height="3985"/> <rect key="frame" x="100" y="44" width="1300" height="4036"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2019 WSOP" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4Hu-Ou-nFd"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2019 WSOP" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4Hu-Ou-nFd">
<rect key="frame" x="0.0" y="0.0" width="1300" height="100"/> <rect key="frame" x="0.0" y="0.0" width="1300" height="100"/>
@ -30,17 +29,17 @@
</label> </label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Iu6-Mp-G7e" userLabel="Space"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Iu6-Mp-G7e" userLabel="Space">
<rect key="frame" x="0.0" y="110" width="1300" height="50"/> <rect key="frame" x="0.0" y="110" width="1300" height="50"/>
<viewLayoutGuide key="safeArea" id="cgF-JL-ieX"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="50" id="hKN-si-3Ts"/> <constraint firstAttribute="height" constant="50" id="hKN-si-3Ts"/>
</constraints> </constraints>
<viewLayoutGuide key="safeArea" id="cgF-JL-ieX"/>
</view> </view>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillProportionally" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="ABP-ce-MDa"> <stackView opaque="NO" contentMode="scaleToFill" distribution="fillProportionally" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="ABP-ce-MDa">
<rect key="frame" x="0.0" y="170" width="1300" height="500"/> <rect key="frame" x="0.0" y="170" width="1300" height="500"/>
<subviews> <subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" contentInsetAdjustmentBehavior="always" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="Vh3-97-zuO"> <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" contentInsetAdjustmentBehavior="always" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="Vh3-97-zuO">
<rect key="frame" x="0.0" y="0.0" width="578" height="500"/> <rect key="frame" x="0.0" y="0.0" width="540.5" height="500"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<inset key="scrollIndicatorInsets" minX="0.0" minY="40" maxX="0.0" maxY="0.0"/> <inset key="scrollIndicatorInsets" minX="0.0" minY="40" maxX="0.0" maxY="0.0"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" sectionInsetReference="safeArea" id="O06-sl-CBC"> <collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" sectionInsetReference="safeArea" id="O06-sl-CBC">
@ -51,11 +50,11 @@
</collectionViewFlowLayout> </collectionViewFlowLayout>
</collectionView> </collectionView>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="HbR-TC-HeD" customClass="TableView" customModule="TournamentStats" customModuleProvider="target"> <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="HbR-TC-HeD" customClass="TableView" customModule="TournamentStats" customModuleProvider="target">
<rect key="frame" x="594" y="0.0" width="579" height="500"/> <rect key="frame" x="556.5" y="0.0" width="626" height="500"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> <color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
</tableView> </tableView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="IqT-2X-roS"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="IqT-2X-roS">
<rect key="frame" x="1189" y="0.0" width="111" height="500"/> <rect key="frame" x="1198.5" y="0.0" width="101.5" height="500"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view> </view>
</subviews> </subviews>
@ -64,47 +63,47 @@
</constraints> </constraints>
</stackView> </stackView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="39t-LC-qXh" userLabel="Space"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="39t-LC-qXh" userLabel="Space">
<rect key="frame" x="0.0" y="680" width="1300" height="50"/> <rect key="frame" x="0.0" y="680" width="1300" height="20"/>
<viewLayoutGuide key="safeArea" id="xzI-Ex-mMX"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="50" id="w2j-e8-Hfu"/> <constraint firstAttribute="height" constant="20" id="w2j-e8-Hfu"/>
</constraints> </constraints>
<viewLayoutGuide key="safeArea" id="xzI-Ex-mMX"/>
</view> </view>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillProportionally" spacing="50" translatesAutoresizingMaskIntoConstraints="NO" id="l2y-sT-HQT"> <stackView opaque="NO" contentMode="scaleToFill" distribution="fillProportionally" spacing="50" translatesAutoresizingMaskIntoConstraints="NO" id="l2y-sT-HQT">
<rect key="frame" x="0.0" y="740" width="1300" height="465"/> <rect key="frame" x="0.0" y="710" width="1300" height="650"/>
<subviews> <subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="uYQ-6Z-Rb4" customClass="TableView" customModule="TournamentStats" customModuleProvider="target"> <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="uYQ-6Z-Rb4" customClass="TableView" customModule="TournamentStats" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="627.5" height="465"/> <rect key="frame" x="0.0" y="0.0" width="670.5" height="650"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/>
</tableView> </tableView>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="ubP-cm-Sbp" customClass="TableView" customModule="TournamentStats" customModuleProvider="target"> <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="ubP-cm-Sbp" customClass="TableView" customModule="TournamentStats" customModuleProvider="target">
<rect key="frame" x="677.5" y="0.0" width="622.5" height="465"/> <rect key="frame" x="720.5" y="0.0" width="579.5" height="650"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> <color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
</tableView> </tableView>
</subviews> </subviews>
<constraints> <constraints>
<constraint firstAttribute="height" constant="465" id="NZj-7i-hbE"/> <constraint firstAttribute="height" constant="650" id="NZj-7i-hbE"/>
</constraints> </constraints>
</stackView> </stackView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Xrv-gg-4dD" userLabel="Space"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Xrv-gg-4dD" userLabel="Space">
<rect key="frame" x="0.0" y="1215" width="1300" height="50"/> <rect key="frame" x="0.0" y="1370" width="1300" height="10"/>
<viewLayoutGuide key="safeArea" id="x7x-j2-Rbi"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="50" id="z1Q-lp-yMy"/> <constraint firstAttribute="height" constant="10" id="z1Q-lp-yMy"/>
</constraints> </constraints>
<viewLayoutGuide key="safeArea" id="x7x-j2-Rbi"/>
</view> </view>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="50" translatesAutoresizingMaskIntoConstraints="NO" id="NbO-FE-SHj"> <stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="50" translatesAutoresizingMaskIntoConstraints="NO" id="NbO-FE-SHj">
<rect key="frame" x="0.0" y="1275" width="1300" height="300"/> <rect key="frame" x="0.0" y="1390" width="1300" height="300"/>
<subviews> <subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="M2m-xf-le9" customClass="TableView" customModule="TournamentStats" customModuleProvider="target"> <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="M2m-xf-le9" customClass="TableView" customModule="TournamentStats" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="625" height="300"/> <rect key="frame" x="0.0" y="0.0" width="625" height="300"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> <color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
</tableView> </tableView>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="Vdb-nD-4Cy" customClass="TableView" customModule="TournamentStats" customModuleProvider="target"> <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="Vdb-nD-4Cy" customClass="TableView" customModule="TournamentStats" customModuleProvider="target">
<rect key="frame" x="675" y="0.0" width="625" height="300"/> <rect key="frame" x="675" y="0.0" width="625" height="300"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> <color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
</tableView> </tableView>
</subviews> </subviews>
<constraints> <constraints>
@ -112,63 +111,71 @@
</constraints> </constraints>
</stackView> </stackView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gTW-Xs-enM" userLabel="Space"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gTW-Xs-enM" userLabel="Space">
<rect key="frame" x="0.0" y="1585" width="1300" height="40"/> <rect key="frame" x="0.0" y="1700" width="1300" height="1"/>
<viewLayoutGuide key="safeArea" id="PMJ-8b-M0C"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="40" id="DCa-vu-Hao"/> <constraint firstAttribute="height" constant="1" id="DCa-vu-Hao"/>
</constraints> </constraints>
<viewLayoutGuide key="safeArea" id="PMJ-8b-M0C"/>
</view> </view>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillProportionally" translatesAutoresizingMaskIntoConstraints="NO" id="91U-hc-Oqn"> <stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="100" translatesAutoresizingMaskIntoConstraints="NO" id="4u9-3E-Qwu">
<rect key="frame" x="0.0" y="1635" width="1300" height="30"/> <rect key="frame" x="0.0" y="1711" width="1300" height="500"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Hcr-dr-rUz" customClass="Label" customModule="TournamentStats" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="650" height="30"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2yf-Z5-Tpy" customClass="Label" customModule="TournamentStats" customModuleProvider="target">
<rect key="frame" x="650" y="0.0" width="650" height="30"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstAttribute="height" constant="30" id="RgL-e2-Q4s"/>
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="4u9-3E-Qwu">
<rect key="frame" x="0.0" y="1675" width="1300" height="450"/>
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Zmk-PV-di2"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="JPM-0a-tLH">
<rect key="frame" x="0.0" y="0.0" width="642" height="450"/> <rect key="frame" x="0.0" y="0.0" width="600" height="500"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <subviews>
</view> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Hcr-dr-rUz" customClass="TitleLabel" customModule="TournamentStats" customModuleProvider="target">
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iQu-2n-Y3T"> <rect key="frame" x="0.0" y="0.0" width="600" height="60"/>
<rect key="frame" x="658" y="0.0" width="642" height="450"/> <constraints>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <constraint firstAttribute="height" constant="60" id="qVH-yN-9IC"/>
</view> </constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Zmk-PV-di2">
<rect key="frame" x="0.0" y="60" width="600" height="440"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="tEF-rK-ahf">
<rect key="frame" x="700" y="0.0" width="600" height="500"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2yf-Z5-Tpy" customClass="TitleLabel" customModule="TournamentStats" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="600" height="60"/>
<constraints>
<constraint firstAttribute="height" constant="60" id="wvI-gl-w2l"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iQu-2n-Y3T">
<rect key="frame" x="0.0" y="60" width="600" height="440"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
</subviews>
</stackView>
</subviews> </subviews>
<constraints> <constraints>
<constraint firstAttribute="height" constant="450" id="zmA-DP-mDx"/> <constraint firstAttribute="height" constant="500" id="zmA-DP-mDx"/>
</constraints> </constraints>
</stackView> </stackView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Zdb-H8-Dy2" userLabel="Space"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Zdb-H8-Dy2" userLabel="Space">
<rect key="frame" x="0.0" y="2135" width="1300" height="40"/> <rect key="frame" x="0.0" y="2221" width="1300" height="80"/>
<viewLayoutGuide key="safeArea" id="DfJ-ph-q9S"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="40" id="mp4-0v-Scg"/> <constraint firstAttribute="height" constant="80" id="mp4-0v-Scg"/>
</constraints> </constraints>
<viewLayoutGuide key="safeArea" id="DfJ-ph-q9S"/>
</view> </view>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="ucv-f0-P2r"> <stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="ucv-f0-P2r">
<rect key="frame" x="0.0" y="2185" width="1300" height="280"/> <rect key="frame" x="0.0" y="2311" width="1300" height="280"/>
<subviews> <subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="0h6-mp-rHD" customClass="TableView" customModule="TournamentStats" customModuleProvider="target"> <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="0h6-mp-rHD" customClass="TableView" customModule="TournamentStats" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="1300" height="280"/> <rect key="frame" x="0.0" y="0.0" width="1300" height="280"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> <color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
</tableView> </tableView>
</subviews> </subviews>
<constraints> <constraints>
@ -176,19 +183,19 @@
</constraints> </constraints>
</stackView> </stackView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fZP-2C-MlN" userLabel="Space"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fZP-2C-MlN" userLabel="Space">
<rect key="frame" x="0.0" y="2475" width="1300" height="40"/> <rect key="frame" x="0.0" y="2601" width="1300" height="20"/>
<viewLayoutGuide key="safeArea" id="3AK-Jb-LaH"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="40" id="G0u-JL-8Ed"/> <constraint firstAttribute="height" constant="20" id="G0u-JL-8Ed"/>
</constraints> </constraints>
<viewLayoutGuide key="safeArea" id="3AK-Jb-LaH"/>
</view> </view>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="JSX-zY-CFg"> <stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="JSX-zY-CFg">
<rect key="frame" x="0.0" y="2525" width="1300" height="280"/> <rect key="frame" x="0.0" y="2631" width="1300" height="280"/>
<subviews> <subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="h84-Ta-8eQ" customClass="TableView" customModule="TournamentStats" customModuleProvider="target"> <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="h84-Ta-8eQ" customClass="TableView" customModule="TournamentStats" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="1300" height="280"/> <rect key="frame" x="0.0" y="0.0" width="1300" height="280"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> <color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
</tableView> </tableView>
</subviews> </subviews>
<constraints> <constraints>
@ -196,86 +203,102 @@
</constraints> </constraints>
</stackView> </stackView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Tt8-Z5-vVb" userLabel="Space"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Tt8-Z5-vVb" userLabel="Space">
<rect key="frame" x="0.0" y="2815" width="1300" height="40"/> <rect key="frame" x="0.0" y="2921" width="1300" height="20"/>
<viewLayoutGuide key="safeArea" id="HMN-3V-5QB"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="40" id="vnz-WB-g1y"/> <constraint firstAttribute="height" constant="20" id="vnz-WB-g1y"/>
</constraints> </constraints>
<viewLayoutGuide key="safeArea" id="HMN-3V-5QB"/>
</view> </view>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" translatesAutoresizingMaskIntoConstraints="NO" id="WFa-d3-zcU"> <stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="100" translatesAutoresizingMaskIntoConstraints="NO" id="9WN-7G-oBN">
<rect key="frame" x="0.0" y="2865" width="1300" height="40"/> <rect key="frame" x="0.0" y="2951" width="1300" height="575"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aSt-Fm-PHF" customClass="Label" customModule="TournamentStats" customModuleProvider="target"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="AMm-tC-vDZ">
<rect key="frame" x="0.0" y="0.0" width="650" height="40"/> <rect key="frame" x="0.0" y="0.0" width="600" height="575"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/> <subviews>
<nil key="textColor"/> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aSt-Fm-PHF" customClass="TitleLabel" customModule="TournamentStats" customModuleProvider="target">
<nil key="highlightedColor"/> <rect key="frame" x="0.0" y="0.0" width="600" height="60"/>
</label> <constraints>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wcd-nU-zRB" customClass="Label" customModule="TournamentStats" customModuleProvider="target"> <constraint firstAttribute="height" constant="60" id="VpJ-ee-DEm"/>
<rect key="frame" x="650" y="0.0" width="650" height="40"/> </constraints>
<fontDescription key="fontDescription" name="Menlo-Regular" family="Menlo" pointSize="17"/> <fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YMb-PS-dFz">
<rect key="frame" x="0.0" y="60" width="600" height="515"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="H3c-Ob-qix">
<rect key="frame" x="700" y="0.0" width="600" height="575"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wcd-nU-zRB" customClass="TitleLabel" customModule="TournamentStats" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="600" height="60"/>
<constraints>
<constraint firstAttribute="height" constant="60" id="fLO-iZ-pCc"/>
</constraints>
<fontDescription key="fontDescription" name="Menlo-Regular" family="Menlo" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="LJL-hy-odj">
<rect key="frame" x="0.0" y="60" width="600" height="515"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
</subviews>
</stackView>
</subviews> </subviews>
<constraints> <constraints>
<constraint firstAttribute="height" constant="40" id="nBc-2w-1Ft"/> <constraint firstAttribute="height" constant="575" id="TTR-HJ-gPu"/>
</constraints> </constraints>
</stackView> </stackView>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="9WN-7G-oBN"> <stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="100" translatesAutoresizingMaskIntoConstraints="NO" id="2iy-YX-agg">
<rect key="frame" x="0.0" y="2915" width="1300" height="500"/> <rect key="frame" x="0.0" y="3536" width="1300" height="500"/>
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YMb-PS-dFz"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="FFe-7b-fWF">
<rect key="frame" x="0.0" y="0.0" width="642" height="500"/> <rect key="frame" x="0.0" y="0.0" width="600" height="500"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <subviews>
</view> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="t1" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7xF-BM-RBb" customClass="TitleLabel" customModule="TournamentStats" customModuleProvider="target">
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="LJL-hy-odj"> <rect key="frame" x="0.0" y="0.0" width="600" height="60"/>
<rect key="frame" x="658" y="0.0" width="642" height="500"/> <constraints>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <constraint firstAttribute="height" constant="60" id="aqm-Jp-xxZ"/>
</view> </constraints>
</subviews> <fontDescription key="fontDescription" type="system" pointSize="17"/>
<constraints> <nil key="textColor"/>
<constraint firstAttribute="height" constant="500" id="TTR-HJ-gPu"/> <nil key="highlightedColor"/>
</constraints> </label>
</stackView> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="X1y-8P-5GO">
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" translatesAutoresizingMaskIntoConstraints="NO" id="myS-g5-vsP"> <rect key="frame" x="0.0" y="60" width="600" height="440"/>
<rect key="frame" x="0.0" y="3425" width="1300" height="50"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<subviews> </view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="t1" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7xF-BM-RBb" customClass="Label" customModule="TournamentStats" customModuleProvider="target"> </subviews>
<rect key="frame" x="0.0" y="0.0" width="650" height="50"/> </stackView>
<fontDescription key="fontDescription" type="system" pointSize="17"/> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="FXu-gm-zJt">
<nil key="textColor"/> <rect key="frame" x="700" y="0.0" width="600" height="500"/>
<nil key="highlightedColor"/> <subviews>
</label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mDV-nN-W7V" customClass="TitleLabel" customModule="TournamentStats" customModuleProvider="target">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mDV-nN-W7V" customClass="Label" customModule="TournamentStats" customModuleProvider="target"> <rect key="frame" x="0.0" y="0.0" width="600" height="60"/>
<rect key="frame" x="650" y="0.0" width="650" height="50"/> <constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/> <constraint firstAttribute="height" constant="60" id="3c7-Gf-p3i"/>
<nil key="textColor"/> </constraints>
<nil key="highlightedColor"/> <fontDescription key="fontDescription" type="system" pointSize="17"/>
</label> <nil key="textColor"/>
</subviews> <nil key="highlightedColor"/>
<constraints> </label>
<constraint firstAttribute="height" constant="50" id="d8p-7J-A5m"/> <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="tVi-Bi-Ese">
</constraints> <rect key="frame" x="0.0" y="60" width="600" height="440"/>
</stackView> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="2iy-YX-agg"> <collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="G6p-YK-B8A">
<rect key="frame" x="0.0" y="3485" width="1300" height="500"/> <size key="itemSize" width="50" height="50"/>
<subviews> <size key="headerReferenceSize" width="0.0" height="0.0"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="X1y-8P-5GO"> <size key="footerReferenceSize" width="0.0" height="0.0"/>
<rect key="frame" x="0.0" y="0.0" width="642" height="500"/> <inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> </collectionViewFlowLayout>
</view> </collectionView>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="tVi-Bi-Ese"> </subviews>
<rect key="frame" x="658" y="0.0" width="642" height="500"/> </stackView>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="G6p-YK-B8A">
<size key="itemSize" width="50" height="50"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
</collectionViewFlowLayout>
</collectionView>
</subviews> </subviews>
<constraints> <constraints>
<constraint firstAttribute="height" constant="500" id="U4b-yO-LB0"/> <constraint firstAttribute="height" constant="500" id="U4b-yO-LB0"/>
@ -284,15 +307,16 @@
</subviews> </subviews>
</stackView> </stackView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Assembled by Team Poker Analytics" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Jzz-Nv-WGn"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Assembled by Team Poker Analytics" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Jzz-Nv-WGn">
<rect key="frame" x="8" y="4062" width="1478" height="30"/> <rect key="frame" x="8" y="4162" width="1478" height="30"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="30" id="i5V-jC-imt"/> <constraint firstAttribute="height" constant="30" id="i5V-jC-imt"/>
</constraints> </constraints>
<fontDescription key="fontDescription" name="Menlo-Regular" family="Menlo" pointSize="15"/> <fontDescription key="fontDescription" name="Menlo-Regular" family="Menlo" pointSize="15"/>
<color key="textColor" red="0.0" green="1" blue="0.7680094838" alpha="0.51496067180000005" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.33794155689287492" green="0.98525673151016235" blue="0.93577719876040433" alpha="0.5" colorSpace="custom" customColorSpace="displayP3"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
<constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="w79-xx-Evx" secondAttribute="trailing" constant="100" id="4VD-EL-9RH"/> <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="w79-xx-Evx" secondAttribute="trailing" constant="100" id="4VD-EL-9RH"/>
@ -303,7 +327,6 @@
<constraint firstItem="w79-xx-Evx" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" id="usO-r7-R25"/> <constraint firstItem="w79-xx-Evx" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" id="usO-r7-R25"/>
</constraints> </constraints>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
<connections> <connections>
<outlet property="collectionView" destination="Vh3-97-zuO" id="uR2-F8-eWB"/> <outlet property="collectionView" destination="Vh3-97-zuO" id="uR2-F8-eWB"/>
<outlet property="collectionView51" destination="tVi-Bi-Ese" id="f6M-Za-9IQ"/> <outlet property="collectionView51" destination="tVi-Bi-Ese" id="f6M-Za-9IQ"/>
@ -313,12 +336,9 @@
<outlet property="container42" destination="LJL-hy-odj" id="7Bq-4v-uda"/> <outlet property="container42" destination="LJL-hy-odj" id="7Bq-4v-uda"/>
<outlet property="containerTableSize" destination="X1y-8P-5GO" id="bFd-fl-9WZ"/> <outlet property="containerTableSize" destination="X1y-8P-5GO" id="bFd-fl-9WZ"/>
<outlet property="hStack1b" destination="ABP-ce-MDa" id="44B-nQ-AOq"/> <outlet property="hStack1b" destination="ABP-ce-MDa" id="44B-nQ-AOq"/>
<outlet property="hStack2a" destination="91U-hc-Oqn" id="5b4-H7-FU3"/>
<outlet property="hStack2b" destination="4u9-3E-Qwu" id="14V-Za-4Iz"/> <outlet property="hStack2b" destination="4u9-3E-Qwu" id="14V-Za-4Iz"/>
<outlet property="hStack3b" destination="ucv-f0-P2r" id="u9R-aG-IpP"/> <outlet property="hStack3b" destination="ucv-f0-P2r" id="u9R-aG-IpP"/>
<outlet property="hStack4a" destination="WFa-d3-zcU" id="i8z-Cc-rbi"/>
<outlet property="hStack4b" destination="9WN-7G-oBN" id="eAg-zC-ojV"/> <outlet property="hStack4b" destination="9WN-7G-oBN" id="eAg-zC-ojV"/>
<outlet property="hStack5a" destination="myS-g5-vsP" id="S4L-12-8qP"/>
<outlet property="hStack5b" destination="2iy-YX-agg" id="iqW-bN-4fc"/> <outlet property="hStack5b" destination="2iy-YX-agg" id="iqW-bN-4fc"/>
<outlet property="infographyTitle" destination="4Hu-Ou-nFd" id="0vL-nP-fjY"/> <outlet property="infographyTitle" destination="4Hu-Ou-nFd" id="0vL-nP-fjY"/>
<outlet property="label21" destination="Hcr-dr-rUz" id="Ggb-ck-2Y7"/> <outlet property="label21" destination="Hcr-dr-rUz" id="Ggb-ck-2Y7"/>
@ -338,4 +358,12 @@
<point key="canvasLocation" x="-1700.0000000000002" y="-204.24107142857142"/> <point key="canvasLocation" x="-1700.0000000000002" y="-204.24107142857142"/>
</view> </view>
</objects> </objects>
<resources>
<systemColor name="groupTableViewBackgroundColor">
<color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document> </document>

@ -22,7 +22,7 @@ class Tournament : Object, Named {
@objc dynamic var date: Date = Date() @objc dynamic var date: Date = Date()
@objc dynamic var number: Int = 0 @objc dynamic var number: Int = 0
@objc dynamic var buyin: Int = 0 @objc dynamic var buyin: Int = 0
@objc dynamic var tableSize: Int = 0 @objc dynamic var tableSize: Int = 9
@objc dynamic var name: String = "" @objc dynamic var name: String = ""
let results = List<Result>() let results = List<Result>()
@ -39,7 +39,8 @@ class Tournament : Object, Named {
} }
var formatted: String { var formatted: String {
return "\(self.buyin.currencyFormatted) \(self.name) (#\(self.number))" return "\(self.buyin.currencyFormatted) \(self.name)"
// return "\(self.buyin.currencyFormatted) \(self.name) (#\(self.number))"
} }
} }

@ -39,7 +39,7 @@ class Queries {
}) })
} }
static func averageCash(realm: Realm, minCount: Int) -> [CumulatedResults] { static func averageCash(realm: Realm, minCount: Int) -> BestAverageCash {
let players = realm.objects(Player.self).filter(NSPredicate(format: "results.@count >= %i", minCount)) let players = realm.objects(Player.self).filter(NSPredicate(format: "results.@count >= %i", minCount))
var crArray: [CumulatedResults] = [] var crArray: [CumulatedResults] = []
@ -48,9 +48,10 @@ class Queries {
crArray.append(CumulatedResults(player: player, options: [.average])) crArray.append(CumulatedResults(player: player, options: [.average]))
} }
return crArray.sorted(by: { (cr1, cr2) -> Bool in let results = crArray.sorted(by: { (cr1, cr2) -> Bool in
return cr1.total > cr2.total return cr1.total > cr2.total
}) })
return BestAverageCash(minimumCashes: minCount, results: results)
} }
static func mostCashes(realm: Realm, notable: Bool = false) -> [CumulatedResults] { static func mostCashes(realm: Realm, notable: Bool = false) -> [CumulatedResults] {
@ -211,10 +212,10 @@ class Queries {
let tournaments: Results<Tournament> = realm.objects(Tournament.self) let tournaments: Results<Tournament> = realm.objects(Tournament.self)
let verylow = DistributionCounter(name: "<$1,000") let verylow = DistributionCounter(name: "<$1K")
let low = DistributionCounter(name: "$1,000 - $1,999") let low = DistributionCounter(name: "$1K - $2K")
let medium = DistributionCounter(name: "$2,000 - $5,000") let medium = DistributionCounter(name: "$2K - $5K")
let high = DistributionCounter(name: ">$5,000") let high = DistributionCounter(name: ">$5K")
let counters: [DistributionCounter] = [verylow, low, medium, high] let counters: [DistributionCounter] = [verylow, low, medium, high]
tournaments.forEach { tournament in tournaments.forEach { tournament in
@ -280,8 +281,8 @@ class Queries {
let tournaments: Results<Tournament> = realm.objects(Tournament.self) let tournaments: Results<Tournament> = realm.objects(Tournament.self)
let noLimitHoldem = DistributionCounter(name: Game.holdem.rawValue) let noLimitHoldem = DistributionCounter(name: Game.holdem.label)
let potLimitOmaha = DistributionCounter(name: Game.omaha.rawValue) let potLimitOmaha = DistributionCounter(name: Game.omaha.label)
let not = DistributionCounter(name: "Others") let not = DistributionCounter(name: "Others")
let games: [DistributionCounter] = [noLimitHoldem, potLimitOmaha, not] let games: [DistributionCounter] = [noLimitHoldem, potLimitOmaha, not]

@ -65,7 +65,7 @@ class ReportGenerator {
var cashesByCountry: [CountryCounter] = [] var cashesByCountry: [CountryCounter] = []
var averageEvent: [TournamentStats] = [] var averageEvent: [TournamentStats] = []
var notablesMostCashes: [CumulatedResults] = [] var notablesMostCashes: [CumulatedResults] = []
var averageCash: [CumulatedResults] = [] var averageCash: BestAverageCash = BestAverageCash(minimumCashes: 0)
var tournamentBuyinDistribution: [DistributionCounter] = [] var tournamentBuyinDistribution: [DistributionCounter] = []
var tournamentPrizepoolDistribution: [DistributionCounter] = [] var tournamentPrizepoolDistribution: [DistributionCounter] = []
var firstPrizeDistribution: [DistributionCounter] = [] var firstPrizeDistribution: [DistributionCounter] = []
@ -88,11 +88,11 @@ class ReportGenerator {
self.tourniesByEntries = Queries.sortedEvents(realm: realm, fieldName: "entries", ascending: false) self.tourniesByEntries = Queries.sortedEvents(realm: realm, fieldName: "entries", ascending: false)
self.tourniesByPrizepool = Queries.sortedEvents(realm: realm, fieldName: "prizepool", ascending: false) self.tourniesByPrizepool = Queries.sortedEvents(realm: realm, fieldName: "prizepool", ascending: false)
self.winsByCountry = Queries.winsByCountry(realm: realm) self.winsByCountry = Queries.winsByCountry(realm: realm)
self.USAvsWorldWins = CountryCounter.aggregate(table: self.winsByCountry, param: "United States") self.USAvsWorldWins = CountryCounter.aggregate(table: self.winsByCountry, param: "US")
self.cashesByCountry = Queries.cashesByCountry(realm: realm) self.cashesByCountry = Queries.cashesByCountry(realm: realm)
self.averageEvent = Queries.averageEvent(realm: realm) self.averageEvent = Queries.averageEvent(realm: realm)
self.notablesMostCashes = Queries.mostCashes(realm: realm, notable: true) self.notablesMostCashes = Queries.mostCashes(realm: realm, notable: true)
self.averageCash = Queries.averageCash(realm: realm, minCount: 4) self.averageCash = Queries.averageCash(realm: realm, minCount: 8)
self.tournamentBuyinDistribution = Queries.tournamentBuyinDistribution(realm: realm) self.tournamentBuyinDistribution = Queries.tournamentBuyinDistribution(realm: realm)
self.tournamentPrizepoolDistribution = Queries.tournamentPrizepoolDistribution(realm: realm) self.tournamentPrizepoolDistribution = Queries.tournamentPrizepoolDistribution(realm: realm)
self.firstPrizeDistribution = Queries.firstPrizeDistribution(realm: realm) self.firstPrizeDistribution = Queries.firstPrizeDistribution(realm: realm)
@ -135,7 +135,7 @@ class ReportGenerator {
self.cashesByCountry.writeHTML(fileName: "reports/countryCashes.html") self.cashesByCountry.writeHTML(fileName: "reports/countryCashes.html")
self.averageEvent.writeHTML(fileName: "reports/averageEvent.html") self.averageEvent.writeHTML(fileName: "reports/averageEvent.html")
self.notablesMostCashes.writeHTML(fileName: "reports/notablesMostCashes.html", limit: nil) self.notablesMostCashes.writeHTML(fileName: "reports/notablesMostCashes.html", limit: nil)
self.averageCash.writeHTML(fileName: "reports/bestAverageCashes.html", limit: 5) self.averageCash.results.writeHTML(fileName: "reports/bestAverageCashes.html", limit: 5)
self.tournamentBuyinDistribution.writeHTML(fileName: "reports/buyinDistribution.html") self.tournamentBuyinDistribution.writeHTML(fileName: "reports/buyinDistribution.html")
self.tournamentPrizepoolDistribution.writeHTML(fileName: "reports/prizepoolDistribution.html") self.tournamentPrizepoolDistribution.writeHTML(fileName: "reports/prizepoolDistribution.html")
self.firstPrizeDistribution.writeHTML(fileName: "reports/firstPrizeDistribution.html") self.firstPrizeDistribution.writeHTML(fileName: "reports/firstPrizeDistribution.html")

@ -60,4 +60,10 @@ final class CountryCounter : HTMLRepresentable, Aggregeable {
return PieChartDataEntry(value: Double(self.counter), label: self.country) return PieChartDataEntry(value: Double(self.counter), label: self.country)
} }
func barChartDataEntry(index: Double) -> BarChartDataEntry {
return BarChartDataEntry(x: index, y: Double(self.counter), data: self.country)
}
var name: String { return self.country }
} }

@ -8,6 +8,13 @@
import Foundation import Foundation
struct BestAverageCash {
var minimumCashes: Int
var results: [CumulatedResults] = []
}
class CumulatedResults : HTMLRepresentable, ColumnRepresentable { class CumulatedResults : HTMLRepresentable, ColumnRepresentable {
enum Options { enum Options {
@ -50,7 +57,7 @@ class CumulatedResults : HTMLRepresentable, ColumnRepresentable {
} }
private func add(result: Result) { private func add(result: Result) {
if result.tournaments.first?.number == 73 && result.rank < 10 { if result.tournaments.first?.number == 67 && result.rank < 10 {
self.mainEventFinalist = true self.mainEventFinalist = true
} }

@ -47,8 +47,8 @@ class FestivalStats : NSObject, UICollectionViewDataSource, UICollectionViewDele
cell.nameLabel.text = name.uppercased() cell.nameLabel.text = name.uppercased()
cell.valueLabel.text = value cell.valueLabel.text = value
cell.nameLabel.textColor = UIColor.white cell.nameLabel.textColor = Fonts.color
cell.valueLabel.textColor = UIColor.white cell.valueLabel.textColor = Fonts.color
cell.nameLabel.font = Fonts.regular cell.nameLabel.font = Fonts.regular
cell.valueLabel.font = Fonts.bigNumbers cell.valueLabel.font = Fonts.bigNumbers

@ -52,9 +52,9 @@ class PlayerNotableFinishesDataSource : NSObject, UITableViewDataSource, UITable
let sortedWins = win.wins.sorted(by: { $0.tournaments.first!.number < $1.tournaments.first!.number }) let sortedWins = win.wins.sorted(by: { $0.tournaments.first!.number < $1.tournaments.first!.number })
for result in sortedWins { for result in sortedWins {
if let tournamentName = result.tournaments.first?.formatted { if let tournamentName = result.tournaments.first?.formatted {
self.winsDisplay.append((" " + tournamentName, Fonts.regular)) self.winsDisplay.append((" " + tournamentName, Fonts.small))
} else { } else {
self.winsDisplay.append(("no tournament!!!", Fonts.regular)) self.winsDisplay.append(("no tournament!!!", Fonts.small))
} }
} }
} }
@ -72,7 +72,7 @@ class PlayerNotableFinishesDataSource : NSObject, UITableViewDataSource, UITable
let sortedRunnerUps = runnerup.runnerUps.sorted(by: { $0.tournaments.first!.number < $1.tournaments.first!.number }) let sortedRunnerUps = runnerup.runnerUps.sorted(by: { $0.tournaments.first!.number < $1.tournaments.first!.number })
for result in sortedRunnerUps { for result in sortedRunnerUps {
if let tournamentName = result.tournaments.first?.formatted { if let tournamentName = result.tournaments.first?.formatted {
self.runnerUpsDisplay.append((" " + tournamentName, Fonts.regular)) self.runnerUpsDisplay.append((" " + tournamentName, Fonts.regular))
} else { } else {
self.runnerUpsDisplay.append(("no tournament!!!", Fonts.regular)) self.runnerUpsDisplay.append(("no tournament!!!", Fonts.regular))
} }
@ -100,10 +100,10 @@ class PlayerNotableFinishesDataSource : NSObject, UITableViewDataSource, UITable
return cumulatedResults return cumulatedResults
} }
// MARK - Table // MARK: - Table
func numberOfSections(in tableView: UITableView) -> Int { func numberOfSections(in tableView: UITableView) -> Int {
return 2 return 1
} }
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
@ -121,7 +121,7 @@ class PlayerNotableFinishesDataSource : NSObject, UITableViewDataSource, UITable
let cell = UITableViewCell() let cell = UITableViewCell()
cell.backgroundColor = UIColor.clear cell.backgroundColor = UIColor.clear
cell.textLabel?.textColor = UIColor.white cell.textLabel?.textColor = Fonts.color
let font: UIFont let font: UIFont
let text: String let text: String
@ -155,12 +155,11 @@ class PlayerNotableFinishesDataSource : NSObject, UITableViewDataSource, UITable
default: default:
text = "Most final tables" text = "Most final tables"
} }
return self.headerLabel(text: text) return self.headerLabel(text: text)
} }
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 36.0 return 32.0
} }
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
@ -173,8 +172,8 @@ class PlayerNotableFinishesDataSource : NSObject, UITableViewDataSource, UITable
func headerLabel(text: String) -> UILabel { func headerLabel(text: String) -> UILabel {
let label = UILabel(frame: CGRect(x: 0, y: 0, width: 500.0, height: 60.0)) let label = UILabel(frame: CGRect(x: 0, y: 0, width: 500.0, height: 60.0))
label.textColor = UIColor.white label.textColor = Fonts.titleColor
label.font = Fonts.subTitle label.font = Fonts.title
label.text = text label.text = text
return label return label
} }

@ -43,6 +43,11 @@ class DistributionCounter : HTMLRepresentable {
return PieChartDataEntry(value: Double(self.counter), label: name) return PieChartDataEntry(value: Double(self.counter), label: name)
} }
func barChartDataEntry(index: Double) -> BarChartDataEntry {
return BarChartDataEntry(x: index, y: Double(self.counter), data: self.name)
}
// func htmlHeaders() -> String { // func htmlHeaders() -> String {
// var strings: [String] = [] // var strings: [String] = []
// strings.append("Tournament") // strings.append("Tournament")

@ -153,8 +153,8 @@ class TournamentStats : NSObject, HTMLRepresentable, UITableViewDelegate, UITabl
cell.nameLabel.text = name.uppercased() cell.nameLabel.text = name.uppercased()
cell.valueLabel.text = value cell.valueLabel.text = value
cell.nameLabel.textColor = UIColor.white cell.nameLabel.textColor = Fonts.color
cell.valueLabel.textColor = UIColor.white cell.valueLabel.textColor = Fonts.color
cell.nameLabel.font = Fonts.regular cell.nameLabel.font = Fonts.regular
cell.valueLabel.font = Fonts.bigNumbers cell.valueLabel.font = Fonts.bigNumbers
@ -163,7 +163,7 @@ class TournamentStats : NSObject, HTMLRepresentable, UITableViewDelegate, UITabl
} }
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
return CGSize(width: 650.0, height: 90.0) return CGSize(width: collectionView.frame.width, height: 90.0)
} }
} }

@ -19,98 +19,104 @@ class Downloader {
static func downloadWSOPResults() { static func downloadWSOPResults() {
let infos: [TS] = [ let infos: [TS] = [
// TS(id: "19728", date: "02/10/2021"), TS(id: "19728", date: "02/10/2021"),
// TS(id: "19729", date: "03/10/2021"), TS(id: "19729", date: "03/10/2021"),
// TS(id: "19730", date: "02/10/2021"), TS(id: "19730", date: "02/10/2021"),
// TS(id: "19732", date: "04/10/2021"), TS(id: "19732", date: "04/10/2021"),
// TS(id: "19733", date: "05/10/2021"), TS(id: "19733", date: "05/10/2021"),
// TS(id: "19731", date: "06/10/2021"), TS(id: "19731", date: "06/10/2021"),
// TS(id: "19734", date: "06/10/2021"), TS(id: "19734", date: "06/10/2021"),
// TS(id: "19926", date: "06/10/2021"), TS(id: "19926", date: "06/10/2021"),
// TS(id: "19927", date: "06/10/2021"), TS(id: "19927", date: "06/10/2021"),
// TS(id: "19737", date: "06/10/2021"), TS(id: "19737", date: "06/10/2021"),
// TS(id: "19735", date: "07/10/2021"), TS(id: "19735", date: "07/10/2021"),
// TS(id: "19736", date: "08/10/2021"), TS(id: "19736", date: "08/10/2021"),
// TS(id: "19738", date: "08/10/2021"), TS(id: "19738", date: "08/10/2021"),
// TS(id: "19739", date: "08/10/2021"), TS(id: "19739", date: "08/10/2021"),
// TS(id: "19740", date: "09/10/2021"), TS(id: "19740", date: "09/10/2021"),
// TS(id: "19741", date: "09/10/2021"), TS(id: "19741", date: "09/10/2021"),
// TS(id: "19928", date: "10/10/2021"), TS(id: "19928", date: "10/10/2021"),
// TS(id: "19742", date: "11/10/2021"), TS(id: "19742", date: "11/10/2021"),
// TS(id: "19743", date: "11/10/2021"), TS(id: "19743", date: "11/10/2021"),
// TS(id: "19745", date: "12/10/2021"), TS(id: "19745", date: "12/10/2021"),
// TS(id: "19747", date: "12/10/2021"), TS(id: "19747", date: "12/10/2021"),
// TS(id: "19748", date: "12/10/2021"), TS(id: "19748", date: "12/10/2021"),
// TS(id: "19749", date: "13/10/2021"), TS(id: "19749", date: "13/10/2021"),
// TS(id: "19744", date: "14/10/2021"), TS(id: "19744", date: "14/10/2021"),
// TS(id: "19751", date: "14/10/2021"), TS(id: "19751", date: "14/10/2021"),
// TS(id: "19752", date: "14/10/2021"), TS(id: "19752", date: "14/10/2021"),
// TS(id: "19750", date: "15/10/2021"), TS(id: "19750", date: "15/10/2021"),
// TS(id: "19754", date: "15/10/2021"), TS(id: "19754", date: "15/10/2021"),
// TS(id: "19753", date: "16/10/2021"), TS(id: "19753", date: "16/10/2021"),
// TS(id: "19755", date: "16/10/2021"), TS(id: "19755", date: "16/10/2021"),
// TS(id: "19756", date: "17/10/2021"), TS(id: "19756", date: "17/10/2021"),
// TS(id: "19757", date: "17/10/2021"), TS(id: "19757", date: "17/10/2021"),
// TS(id: "19759", date: "17/10/2021"), TS(id: "19759", date: "17/10/2021"),
// TS(id: "19929", date: "17/10/2021"), TS(id: "19929", date: "17/10/2021"),
// TS(id: "19761", date: "19/10/2021"), TS(id: "19761", date: "19/10/2021"),
// TS(id: "19762", date: "19/10/2021"), TS(id: "19762", date: "19/10/2021"),
// TS(id: "19758", date: "20/10/2021"), TS(id: "19758", date: "20/10/2021"),
// TS(id: "19763", date: "20/10/2021"), TS(id: "19763", date: "20/10/2021"),
// TS(id: "19764", date: "20/10/2021"), TS(id: "19764", date: "20/10/2021"),
// TS(id: "19765", date: "21/10/2021"), TS(id: "19765", date: "21/10/2021"),
// TS(id: "19766", date: "21/10/2021"), TS(id: "19766", date: "21/10/2021"),
// TS(id: "19767", date: "22/10/2021"), TS(id: "19767", date: "22/10/2021"),
// TS(id: "19768", date: "23/10/2021"), TS(id: "19768", date: "23/10/2021"),
// TS(id: "19769", date: "24/10/2021"), TS(id: "19769", date: "24/10/2021"),
// TS(id: "19770", date: "24/10/2021"), TS(id: "19770", date: "24/10/2021"),
// TS(id: "19771", date: "24/10/2021"), TS(id: "19771", date: "24/10/2021"),
// TS(id: "19930", date: "24/10/2021"), TS(id: "19930", date: "24/10/2021"),
// TS(id: "19832", date: "25/10/2021"), TS(id: "19832", date: "25/10/2021"),
// TS(id: "19774", date: "26/10/2021"), TS(id: "19774", date: "26/10/2021"),
// TS(id: "19772", date: "27/10/2021"), TS(id: "19772", date: "27/10/2021"),
// TS(id: "19773", date: "27/10/2021"), TS(id: "19773", date: "27/10/2021"),
// TS(id: "19775", date: "27/10/2021"), TS(id: "19775", date: "27/10/2021"),
// TS(id: "19776", date: "28/10/2021"), TS(id: "19776", date: "28/10/2021"),
// TS(id: "19778", date: "28/10/2021"), TS(id: "19778", date: "28/10/2021"),
// TS(id: "19779", date: "28/10/2021"), TS(id: "19779", date: "28/10/2021"),
// TS(id: "19780", date: "28/10/2021"), TS(id: "19780", date: "28/10/2021"),
// TS(id: "19782", date: "31/10/2021"), TS(id: "19782", date: "31/10/2021"),
// TS(id: "19784", date: "31/10/2021"), TS(id: "19784", date: "31/10/2021"),
// TS(id: "19931", date: "31/10/2021"), TS(id: "19931", date: "31/10/2021"),
// TS(id: "19781", date: "01/11/2021"), TS(id: "19781", date: "01/11/2021"),
// TS(id: "19786", date: "01/11/2021"), TS(id: "19786", date: "01/11/2021"),
// TS(id: "19785", date: "02/11/2021"), TS(id: "19785", date: "02/11/2021"),
// TS(id: "19788", date: "02/11/2021"), TS(id: "19788", date: "02/11/2021"),
// TS(id: "19789", date: "03/11/2021"), TS(id: "19789", date: "03/11/2021"),
// TS(id: "19790", date: "03/11/2021"), TS(id: "19790", date: "03/11/2021"),
// TS(id: "19792", date: "04/11/2021"), TS(id: "19792", date: "04/11/2021"),
// TS(id: "19793", date: "04/11/2021"), TS(id: "19793", date: "04/11/2021"),
// TS(id: "19795", date: "04/11/2021"), TS(id: "19795", date: "04/11/2021"),
// TS(id: "19794", date: "05/11/2021"), TS(id: "19794", date: "05/11/2021"),
// TS(id: "19791", date: "06/11/2021"), TS(id: "19791", date: "06/11/2021"),
// TS(id: "19796", date: "06/11/2021"), TS(id: "19796", date: "06/11/2021"),
// TS(id: "19797", date: "06/11/2021"), TS(id: "19797", date: "06/11/2021"),
// TS(id: "19805", date: "13/11/2021"), TS(id: "19805", date: "13/11/2021"),
// TS(id: "19802", date: "14/11/2021"), TS(id: "19802", date: "14/11/2021"),
// TS(id: "19807", date: "14/11/2021"), TS(id: "19807", date: "14/11/2021"),
// TS(id: "19809", date: "15/11/2021"), TS(id: "19809", date: "15/11/2021"),
// TS(id: "19933", date: "16/11/2021"), TS(id: "19811", date: "15/11/2021"),
// TS(id: "19934", date: "16/11/2021"), TS(id: "19933", date: "16/11/2021"),
// TS(id: "19808", date: "17/11/2021"), TS(id: "19934", date: "16/11/2021"),
// TS(id: "19813", date: "17/11/2021"), TS(id: "19808", date: "17/11/2021"),
// TS(id: "19815", date: "17/11/2021"), TS(id: "19813", date: "17/11/2021"),
// TS(id: "19798", date: "18/11/2021"), TS(id: "19815", date: "17/11/2021"),
// TS(id: "19814", date: "18/11/2021"), TS(id: "19798", date: "18/11/2021"),
// TS(id: "19816", date: "18/11/2021"), TS(id: "19814", date: "18/11/2021"),
// TS(id: "19817", date: "20/11/2021"), TS(id: "19816", date: "18/11/2021"),
// TS(id: "19818", date: "20/11/2021"), TS(id: "19817", date: "20/11/2021"),
// TS(id: "19819", date: "20/11/2021"), TS(id: "19818", date: "20/11/2021"),
// TS(id: "19820", date: "20/11/2021"), TS(id: "19819", date: "20/11/2021"),
TS(id: "19820", date: "20/11/2021"),
TS(id: "19821", date: "21/11/2021"), TS(id: "19821", date: "21/11/2021"),
TS(id: "19822", date: "21/11/2021"), TS(id: "19822", date: "21/11/2021"),
TS(id: "19823", date: "21/11/2021"), TS(id: "19823", date: "21/11/2021"),
TS(id: "19827", date: "21/11/2021"), TS(id: "19827", date: "21/11/2021"),
TS(id: "19828", date: "22/11/2021"),
TS(id: "19829", date: "22/11/2021"),
TS(id: "19936", date: "22/11/2021"),
TS(id: "19935", date: "22/11/2021"),
TS(id: "19830", date: "22/11/2021"),
] ]
@ -178,6 +184,7 @@ class Downloader {
if let strNumber = name.slice(from: "Event #", to: ":"), let number = nf.number(from: strNumber) { if let strNumber = name.slice(from: "Event #", to: ":"), let number = nf.number(from: strNumber) {
tour.number = number.intValue tour.number = number.intValue
} }
print("#\(tour.number) \(name)")
if name.contains("6-Handed") { if name.contains("6-Handed") {
tour.tableSize = 6 tour.tableSize = 6
@ -223,7 +230,7 @@ class Downloader {
let cells = strresult.components(separatedBy: "<li") let cells = strresult.components(separatedBy: "<li")
if !(cells.count == 6 || cells.count == 7) { if !(cells.count == 6 || cells.count == 7) {
print("cell count = \(cells.count)") // print("cell count = \(cells.count)")
continue continue
} }

@ -37,17 +37,36 @@ struct ColumnDescriptor {
protocol ColumnRepresentable { protocol ColumnRepresentable {
func columnDescriptors() -> [ColumnDescriptor] func columnDescriptors() -> [ColumnDescriptor]
func cellValues() -> [String] func cellValues() -> [String]
var chartDataEntry: ChartDataEntry { get } func barChartDataEntry(index: Double) -> BarChartDataEntry
var pieChartDataEntry: PieChartDataEntry { get } var pieChartDataEntry: PieChartDataEntry { get }
var name: String { get }
} }
extension ColumnRepresentable { extension ColumnRepresentable {
var chartDataEntry: ChartDataEntry {
return ChartDataEntry(x: 0, y: 0) func barChartDataEntry(index: Double) -> BarChartDataEntry {
return BarChartDataEntry(x: 0, y: 0)
} }
var pieChartDataEntry: PieChartDataEntry { var pieChartDataEntry: PieChartDataEntry {
return PieChartDataEntry(value: 0.0) return PieChartDataEntry(value: 0.0)
} }
var name: String { return "none" }
}
class IntFormatter : ValueFormatter {
var numberFormatter: NumberFormatter = NumberFormatter()
init() {
self.numberFormatter.maximumFractionDigits = 0
}
func stringForValue(_ value: Double, entry: ChartDataEntry, dataSetIndex: Int, viewPortHandler: ViewPortHandler?) -> String {
return self.numberFormatter.string(from: NSNumber(value: value)) ?? ""
}
} }
class PercentageFormatter : ValueFormatter { class PercentageFormatter : ValueFormatter {
@ -77,31 +96,34 @@ extension Array where Element : ColumnRepresentable {
dataEntries.append(representable.pieChartDataEntry) dataEntries.append(representable.pieChartDataEntry)
} }
let dataSet = PieChartDataSet(entries: dataEntries, label: "") let dataSet = PieChartDataSet(entries: dataEntries, label: "")
dataSet.entryLabelFont = Fonts.pieChartEntries dataSet.entryLabelFont = Fonts.chartEntries
dataSet.valueFont = Fonts.pieChartEntries dataSet.valueFont = Fonts.chartEntries
dataSet.colors = [UIColor.paGreen, UIColor.paColor2, UIColor.paColor3, UIColor.paBlue] dataSet.colors = [UIColor.paGreen, UIColor.paColor2, UIColor.paColor3, UIColor.paBlue]
dataSet.valueFormatter = PercentageFormatter() dataSet.valueFormatter = PercentageFormatter()
return PieChartData(dataSet: dataSet) return PieChartData(dataSet: dataSet)
} }
var chartData: ChartData { var barChartData: BarChartData {
var dataEntries: [ChartDataEntry] = [] var dataEntries: [BarChartDataEntry] = []
self.forEach { representable in
dataEntries.append(representable.chartDataEntry) for (index, representable) in self.enumerated() {
dataEntries.append(representable.barChartDataEntry(index: Double(index)))
} }
let dataSet = ChartDataSet(entries: dataEntries)
return ChartData(dataSet: dataSet) let dataSet = BarChartDataSet(entries: dataEntries, label: "")
dataSet.valueColors = [UIColor.white]
dataSet.valueFont = Fonts.chartEntries
dataSet.colors = [UIColor.paGreen, UIColor.paColor2, UIColor.paColor3, UIColor.paBlue]
dataSet.valueFormatter = IntFormatter()
return BarChartData(dataSet: dataSet)
} }
} var labels: [String] {
return self.map { $0.name }
}
//extension Array where Element : Aggregeable { }
//
// func aggregate(param: String) -> [Element] {
// return []
// }
//
//}
protocol Aggregeable { protocol Aggregeable {
static func aggregate(table: [Self], param: String) -> [Self] static func aggregate(table: [Self], param: String) -> [Self]

@ -11,4 +11,12 @@ import Foundation
enum Game : String { enum Game : String {
case holdem = "No-Limit Hold'em" case holdem = "No-Limit Hold'em"
case omaha = "Pot-Limit Omaha" case omaha = "Pot-Limit Omaha"
var label: String {
switch self {
case .holdem: return "NL Hold'em"
case .omaha: return "PL Omaha"
}
}
} }

Loading…
Cancel
Save