forked from ackleymi/MAStockGraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMAStockGraph.h
81 lines (44 loc) · 1.44 KB
/
MAStockGraph.h
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//
// MAStockGraph.h
// MAStockGraph
//
#import <UIKit/UIKit.h>
#import "Circle.h"
#import "Line.h"
#import "Animation.h"
@protocol StockGraphDelegate <NSObject>
@required
- (int)numberOfPointsInGraph;
- (float)valueForIndex:(NSInteger)index;
// Company Information
- (NSString *)companyName;
- (NSString *)ticker;
- (NSString *)priceInfo;
- (NSString *)stockPrice;
@optional
// Touch events
- (void)didTouchGraphWithClosestIndex:(int)index;
- (void)didReleaseGraphWithClosestIndex:(float)index;
// X Axis
- (int)numberOfGapsBetweenLabels;
- (NSString *)labelOnXAxisForIndex:(NSInteger)index;
@end
@interface MAStockGraph : UIView <UIGestureRecognizerDelegate, AnimationDelegate>
@property (assign) IBOutlet id <StockGraphDelegate> delegate;
@property (strong, nonatomic) Animation *animateDelegate;
@property (strong, nonatomic) UIView *verticalLine;
@property (strong, nonatomic) UIFont *labelFont;
/// Reload the graph
- (void)reloadGraph;
// Customize
@property (nonatomic) NSInteger animationGraphEntranceSpeed;
@property (nonatomic) BOOL enableTouchReport;
@property (strong, nonatomic) UIColor *colorBottom;
@property (nonatomic) float alphaBottom;
@property (strong, nonatomic) UIColor *colorTop;
@property (nonatomic) float alphaTop;
@property (strong, nonatomic) UIColor *colorLine;
@property (nonatomic) float alphaLine;
@property (nonatomic) float widthLine;
@property (strong, nonatomic) UIColor *colorXaxisLabel;
@end