-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathViewController.m
More file actions
48 lines (34 loc) · 1.42 KB
/
ViewController.m
File metadata and controls
48 lines (34 loc) · 1.42 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
//
// ViewController.m
// LineChart
//
// Created by zhangchao on 16/3/2.
// Copyright © 2016年 zhangchao. All rights reserved.
//
#import "ViewController.h"
#import "ZCLineChart.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
self.view.backgroundColor = [UIColor whiteColor];
NSMutableArray* xArray = [[NSMutableArray alloc] initWithObjects:
@"2016-02-08 13:14:55",
@"2016-02-09 14:48:30",
@"2016-02-10 16:47:23",
@"2016-02-11 04:17:50",nil];
NSMutableArray* yArray = [[NSMutableArray alloc]init];
NSMutableDictionary* dict = [[NSMutableDictionary alloc] initWithObjects:@[@[@"176",@"177",@"180",@"190"],@"身高"] forKeys:@[@"array",@"title"]];
NSMutableDictionary* newDict = [[NSMutableDictionary alloc] initWithObjects:@[@[@"50",@"80",@"100",@"220"],@"体重"] forKeys:@[@"array",@"title"]];
[yArray addObject:dict];
[yArray addObject:newDict];
LCLineChartView* chartView = [ZCLineChart drawChartViewBeginTime:@"2016-02-08" EndTime:@"2016-02-11" Rect:CGRectMake(0, 60, self.view.frame.size.width, 200) Unit:@"cm" XArray:xArray YArray:yArray];
[self.view addSubview:chartView];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end