PNGenericChart.m
988 Bytes
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
//
// PNGenericChart.m
// PNChartDemo
//
// Created by Andi Palo on 26/02/15.
// Copyright (c) 2015 kevinzhow. All rights reserved.
//
#import "PNGenericChart.h"
@interface PNGenericChart ()
@end
@implementation PNGenericChart
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
- (void) setupDefaultValues{
self.hasLegend = YES;
self.legendPosition = PNLegendPositionBottom;
self.legendStyle = PNLegendItemStyleStacked;
self.labelRowsInSerialMode = 1;
}
/**
* to be implemented in subclass
*/
- (UIView*) getLegendWithMaxWidth:(CGFloat)mWidth{
[self doesNotRecognizeSelector:_cmd];
return nil;
}
- (void) setLabelRowsInSerialMode:(NSUInteger)num{
if (self.legendStyle == PNLegendItemStyleSerial) {
_labelRowsInSerialMode = num;
}else{
_labelRowsInSerialMode = 1;
}
}
@end