Kevin

Merge pull request #134 from onevcat/feature/ib-support

Feature/ib support
... ... @@ -22,33 +22,47 @@
@implementation PNBarChart
- (id)initWithCoder:(NSCoder *)aDecoder
{
self = [super initWithCoder:aDecoder];
if (self) {
[self setupDefaultValues];
}
return self;
}
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
self.backgroundColor = [UIColor whiteColor];
self.clipsToBounds = YES;
_showLabel = YES;
_barBackgroundColor = PNLightGrey;
_labelTextColor = [UIColor grayColor];
_labelFont = [UIFont systemFontOfSize:11.0f];
_xChartLabels = [NSMutableArray array];
_yChartLabels = [NSMutableArray array];
_bars = [NSMutableArray array];
_xLabelSkip = 1;
_yLabelSum = 4;
_labelMarginTop = 0;
_chartMargin = 15.0;
_barRadius = 2.0;
_showChartBorder = NO;
_yChartLabelWidth = 18;
_rotateForXAxisText = false;
[self setupDefaultValues];
}
return self;
}
- (void)setupDefaultValues
{
self.backgroundColor = [UIColor whiteColor];
self.clipsToBounds = YES;
_showLabel = YES;
_barBackgroundColor = PNLightGrey;
_labelTextColor = [UIColor grayColor];
_labelFont = [UIFont systemFontOfSize:11.0f];
_xChartLabels = [NSMutableArray array];
_yChartLabels = [NSMutableArray array];
_bars = [NSMutableArray array];
_xLabelSkip = 1;
_yLabelSum = 4;
_labelMarginTop = 0;
_chartMargin = 15.0;
_barRadius = 2.0;
_showChartBorder = NO;
_yChartLabelWidth = 18;
_rotateForXAxisText = false;
}
- (void)setYValues:(NSArray *)yValues
{
... ...
... ... @@ -20,8 +20,6 @@
@property (nonatomic) NSMutableArray *chartPath; // Array of line path, one for each line.
@property (nonatomic) NSMutableArray *pointPath; // Array of point path, one for each line
- (void)setDefaultValues;
@end
@implementation PNLineChart
... ... @@ -33,7 +31,7 @@
self = [super initWithCoder:coder];
if (self) {
[self setDefaultValues];
[self setupDefaultValues];
}
return self;
... ... @@ -44,7 +42,7 @@
self = [super initWithFrame:frame];
if (self) {
[self setDefaultValues];
[self setupDefaultValues];
}
return self;
... ... @@ -646,7 +644,7 @@
#pragma mark private methods
- (void)setDefaultValues
- (void)setupDefaultValues
{
// Initialization code
self.backgroundColor = [UIColor whiteColor];
... ...
... ... @@ -11,13 +11,13 @@
{
self = [super init];
if (self) {
[self setDefaultValues];
[self setupDefaultValues];
}
return self;
}
- (void)setDefaultValues
- (void)setupDefaultValues
{
_inflexionPointStyle = PNLineChartPointStyleNone;
_inflexionPointWidth = 6.f;
... ...
... ... @@ -46,8 +46,6 @@
@property (nonatomic) BOOL isForUpdate;
- (void)setDefaultValues;
@end
... ... @@ -60,7 +58,7 @@
self = [super initWithCoder:coder];
if (self) {
[self setDefaultValues];
[self setupDefaultValues];
}
return self;
}
... ... @@ -70,7 +68,7 @@
self = [super initWithFrame:frame];
if (self) {
[self setDefaultValues];
[self setupDefaultValues];
}
return self;
}
... ... @@ -81,7 +79,7 @@
[self vectorYSetup];
}
- (void)setDefaultValues
- (void)setupDefaultValues
{
// Initialization code
self.backgroundColor = [UIColor whiteColor];
... ...
... ... @@ -14,13 +14,13 @@
{
self = [super init];
if (self) {
[self setDefaultValues];
[self setupDefaultValues];
}
return self;
}
- (void)setDefaultValues
- (void)setupDefaultValues
{
_inflexionPointStyle = PNScatterChartPointStyleCircle;
_fillColor = [UIColor grayColor];
... ...