|
37 | 37 | {
|
38 | 38 | NSString *title;
|
39 | 39 | NSArray *points;
|
40 |
| - NSArray *colour; |
| 40 | + UIColor *colour; |
| 41 | + BOOL shouldLabelValues; |
41 | 42 | }
|
| 43 | +@property (nonatomic, assign) BOOL shouldLabelValues; |
42 | 44 | @property (nonatomic, retain) NSArray *points;
|
43 |
| -@property (nonatomic, retain) NSArray *colour; |
| 45 | +@property (nonatomic, retain) UIColor *colour; |
44 | 46 | @property (nonatomic, retain) NSString *title;
|
45 | 47 | @end
|
46 | 48 |
|
47 |
| -#define PCColorBlue [NSArray arrayWithObjects:[NSNumber numberWithFloat:0.0],[NSNumber numberWithFloat:153/255.0],[NSNumber numberWithFloat:204/255.0],[NSNumber numberWithFloat:1.0],nil] |
48 |
| -#define PCColorGreen [NSArray arrayWithObjects:[NSNumber numberWithFloat:153/255.0],[NSNumber numberWithFloat:204/255.0],[NSNumber numberWithFloat:51/255.0],[NSNumber numberWithFloat:1.0],nil] |
49 |
| -#define PCColorOrange [NSArray arrayWithObjects:[NSNumber numberWithFloat:1.0],[NSNumber numberWithFloat:153/255.0],[NSNumber numberWithFloat:51/255.0],[NSNumber numberWithFloat:1.0],nil] |
50 |
| -#define PCColorRed [NSArray arrayWithObjects:[NSNumber numberWithFloat:1.0],[NSNumber numberWithFloat:51/255.0],[NSNumber numberWithFloat:51/255.0],[NSNumber numberWithFloat:1.0],nil] |
51 |
| -#define PCColorYellow [NSArray arrayWithObjects:[NSNumber numberWithFloat:255/255.0],[NSNumber numberWithFloat:220/255.0],[NSNumber numberWithFloat:0.0],[NSNumber numberWithFloat:1.0],nil] |
52 |
| -#define PCColorDefault [NSArray arrayWithObjects:[NSNumber numberWithFloat:0.5],[NSNumber numberWithFloat:0.5],[NSNumber numberWithFloat:0.5],[NSNumber numberWithFloat:1.0],nil] |
| 49 | + |
| 50 | +#define PCColorBlue [UIColor colorWithRed:0.0 green:153/255.0 blue:204/255.0 alpha:1.0] |
| 51 | +#define PCColorGreen [UIColor colorWithRed:153/255.0 green:204/255.0 blue:51/255.0 alpha:1.0] |
| 52 | +#define PCColorOrange [UIColor colorWithRed:1.0 green:153/255.0 blue:51/255.0 alpha:1.0] |
| 53 | +#define PCColorRed [UIColor colorWithRed:1.0 green:51/255.0 blue:51/255.0 alpha:1.0] |
| 54 | +#define PCColorYellow [UIColor colorWithRed:1.0 green:220/255.0 blue:0.0 alpha:1.0] |
| 55 | +#define PCColorDefault [UIColor colorWithRed:0.5 green:0.5 blue:0.5 alpha:1.0] |
53 | 56 |
|
54 | 57 |
|
55 | 58 | @interface PCLineChartView : UIView {
|
56 | 59 | NSMutableArray *components;
|
57 | 60 | NSMutableArray *xLabels;
|
| 61 | + UIFont *yLabelFont, *xLabelFont, *valueLabelFont, *legendFont; |
58 | 62 | int interval;
|
| 63 | + float minValue; |
| 64 | + float maxValue; |
59 | 65 | }
|
60 | 66 |
|
61 | 67 | @property (nonatomic, assign) int interval;
|
| 68 | +@property (nonatomic, assign) float minValue; |
| 69 | +@property (nonatomic, assign) float maxValue; |
62 | 70 | @property (nonatomic, retain) NSMutableArray *components, *xLabels;
|
63 |
| - |
64 |
| -int sortByNumber(NSNumber *firstComponent, NSNumber *secondComponent, void*context); |
65 |
| -int sortLegend(NSMutableDictionary *firstComponent, NSMutableDictionary *secondComponent, void*context); |
| 71 | +@property (nonatomic, retain) UIFont *yLabelFont, *xLabelFont, *valueLabelFont, *legendFont; |
66 | 72 |
|
67 | 73 | @end
|
0 commit comments