-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDayMetricVC.swift
More file actions
65 lines (42 loc) · 1.46 KB
/
DayMetricVC.swift
File metadata and controls
65 lines (42 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//
// DayMetricVC.swift
// Dindr
//
// Created by lsecrease on 1/23/16.
// Copyright © 2016. All rights reserved.
//
import UIKit
import SwiftChart
class DayMetricVC: UIViewController, UITableViewDataSource, UITableViewDelegate {
@IBOutlet weak var tableView: UITableView!
var months: [String]!
override func viewDidLoad() {
super.viewDidLoad()
}
func numberOfSectionsInTableView(tableView: UITableView) -> Int {
return 1
}
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("DayCell", forIndexPath: indexPath) as! DayMetricTableViewCell
//cell.delegate = self
let data = [(x: 0, y: 0), (x: 0.5, y: 3.1), (x: 1.2, y: 2), (x: 2.1, y: 4.2), (x: 2.6, y: 1.1)]
let series = ChartSeries(data: data)
series.color = ChartColors.redColor()
series.area = true
cell.chart.highlightLineColor = ChartColors.blueColor()
cell.chart.highlightLineWidth = 1.5
cell.chart.areaAlphaComponent = 5.0
cell.chart.addSeries(series)
return cell
}
}
//extension DayMetricVC : ChartShowDelegate {
//
// func showChart(chart: Chart) {
//
// }
//
//}