dullgrass

fix conflicts

@@ -18,6 +18,6 @@ DerivedData @@ -18,6 +18,6 @@ DerivedData
18 *.hmap 18 *.hmap
19 *.xccheckout 19 *.xccheckout
20 Build/ 20 Build/
21 - 21 +*.lock
22 #CocoaPods 22 #CocoaPods
23 Pods 23 Pods
@@ -16,7 +16,7 @@ Pod::Spec.new do |s| @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
16 # 16 #
17 17
18 s.name = "PNChart" 18 s.name = "PNChart"
19 - s.version = "0.8.2" 19 + s.version = "0.8.3"
20 s.summary = "A simple and beautiful chart lib with animation used in Piner for iOS" 20 s.summary = "A simple and beautiful chart lib with animation used in Piner for iOS"
21 21
22 s.description = <<-DESC 22 s.description = <<-DESC
@@ -32,7 +32,7 @@ Pod::Spec.new do |s| @@ -32,7 +32,7 @@ Pod::Spec.new do |s|
32 32
33 ## Requirements 33 ## Requirements
34 34
35 - PNChart works on iOS 6.0 and later version and is compatible with ARC projects. It depends on the following Apple frameworks, which should already be included with most Xcode templates: 35 + PNChart works on iOS 7.0 and later version and is compatible with ARC projects. It depends on the following Apple frameworks, which should already be included with most Xcode templates:
36 36
37 * Foundation.framework 37 * Foundation.framework
38 * UIKit.framework 38 * UIKit.framework
@@ -77,7 +77,7 @@ Pod::Spec.new do |s| @@ -77,7 +77,7 @@ Pod::Spec.new do |s|
77 # the deployment target. You can optionally include the target after the platform. 77 # the deployment target. You can optionally include the target after the platform.
78 # 78 #
79 79
80 - s.platform = :ios, "8.0" 80 + s.platform = :ios, "7.0"
81 81
82 # When using multiple platforms 82 # When using multiple platforms
83 # s.ios.deployment_target = "5.0" 83 # s.ios.deployment_target = "5.0"
@@ -90,7 +90,7 @@ Pod::Spec.new do |s| @@ -90,7 +90,7 @@ Pod::Spec.new do |s|
90 # Supports git, hg, bzr, svn and HTTP. 90 # Supports git, hg, bzr, svn and HTTP.
91 # 91 #
92 92
93 - s.source = { :git => "https://github.com/kevinzhow/PNChart.git", :tag => "0.8.2" } 93 + s.source = { :git => "https://github.com/kevinzhow/PNChart.git", :tag => "0.8.3" }
94 94
95 95
96 # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 96 # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
@@ -143,6 +143,6 @@ Pod::Spec.new do |s| @@ -143,6 +143,6 @@ Pod::Spec.new do |s|
143 s.requires_arc = true 143 s.requires_arc = true
144 144
145 # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } 145 # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }
146 - s.dependency 'UICountingLabel', '~> 1.0.0' 146 + s.dependency 'UICountingLabel', '~> 1.2.0'
147 147
148 end 148 end
@@ -183,6 +183,7 @@ @@ -183,6 +183,7 @@
183 [_textLayer setAlignmentMode:kCAAlignmentCenter]; 183 [_textLayer setAlignmentMode:kCAAlignmentCenter];
184 [_textLayer setForegroundColor:[[UIColor colorWithRed:178/255.0 green:178/255. blue:178/255.0 alpha:1.0] CGColor]]; 184 [_textLayer setForegroundColor:[[UIColor colorWithRed:178/255.0 green:178/255. blue:178/255.0 alpha:1.0] CGColor]];
185 _textLayer.hidden = YES; 185 _textLayer.hidden = YES;
  186 +
186 } 187 }
187 188
188 return _textLayer; 189 return _textLayer;
@@ -64,6 +64,9 @@ @@ -64,6 +64,9 @@
64 _rotateForXAxisText = false; 64 _rotateForXAxisText = false;
65 _isGradientShow = YES; 65 _isGradientShow = YES;
66 _isShowNumbers = YES; 66 _isShowNumbers = YES;
  67 + _yLabelFormatter = ^(CGFloat yValue){
  68 + return [NSString stringWithFormat:@"%1.f",yValue];
  69 + };
67 } 70 }
68 71
69 - (void)setYValues:(NSArray *)yValues 72 - (void)setYValues:(NSArray *)yValues
@@ -143,9 +146,10 @@ @@ -143,9 +146,10 @@
143 }else{ 146 }else{
144 _xChartLabels = [NSMutableArray new]; 147 _xChartLabels = [NSMutableArray new];
145 } 148 }
146 - 149 +
147 - if (_showLabel) { 150 + _xLabelWidth = (self.frame.size.width - _chartMargin * 2) / [xLabels count];
148 - _xLabelWidth = (self.frame.size.width - _chartMargin * 2) / [xLabels count]; 151 +
  152 + if (_showLabel) {
149 int labelAddCount = 0; 153 int labelAddCount = 0;
150 for (int index = 0; index < _xLabels.count; index++) { 154 for (int index = 0; index < _xLabels.count; index++) {
151 labelAddCount += 1; 155 labelAddCount += 1;
@@ -409,7 +409,7 @@ @@ -409,7 +409,7 @@
409 if (!(_yValueMax - _yValueMin)) { 409 if (!(_yValueMax - _yValueMin)) {
410 innerGrade = 0.5; 410 innerGrade = 0.5;
411 } else { 411 } else {
412 - innerGrade = (yValue - _yValueMin) / (_yValueMax - _yValueMin) == 0 ? 0.5 : (yValue - _yValueMin) / (_yValueMax - _yValueMin); 412 + innerGrade = (yValue - _yValueMin) / (_yValueMax - _yValueMin);
413 } 413 }
414 414
415 CGFloat offSetX = (_chartCavanWidth) / (chartData.itemCount); 415 CGFloat offSetX = (_chartCavanWidth) / (chartData.itemCount);
1 PODS: 1 PODS:
2 - - Expecta (0.3.2) 2 + - Expecta (0.4.2)
3 - UICountingLabel (1.2.0) 3 - UICountingLabel (1.2.0)
4 4
5 DEPENDENCIES: 5 DEPENDENCIES:
@@ -7,7 +7,8 @@ DEPENDENCIES: @@ -7,7 +7,8 @@ DEPENDENCIES:
7 - UICountingLabel (~> 1.2.0) 7 - UICountingLabel (~> 1.2.0)
8 8
9 SPEC CHECKSUMS: 9 SPEC CHECKSUMS:
10 - Expecta: 8c507baf13211207b1e9d0a741480600e6b4ed15 10 + Expecta: 78b4e8b0c8291fa4524d7f74016b6065c2e391ec
11 UICountingLabel: 1db4e7d023e1762171eb226d6dff47a7a84f27aa 11 UICountingLabel: 1db4e7d023e1762171eb226d6dff47a7a84f27aa
12 12
13 COCOAPODS: 0.37.1 13 COCOAPODS: 0.37.1
  14 +