Merge pull request #95 from Antoine4011/custom-style
Label customization in PNLineChart
Showing
5 changed files
with
17 additions
and
8 deletions
| 1 | Pod::Spec.new do |s| | 1 | Pod::Spec.new do |s| |
| 2 | s.name = "PNChart" | 2 | s.name = "PNChart" |
| 3 | - s.version = "0.2.2" | 3 | + s.version = "0.6.0" |
| 4 | s.summary = "A simple and beautiful chart lib with animation used in Piner for iOS" | 4 | s.summary = "A simple and beautiful chart lib with animation used in Piner for iOS" |
| 5 | 5 | ||
| 6 | s.homepage = "https://github.com/kevinzhow/PNChart" | 6 | s.homepage = "https://github.com/kevinzhow/PNChart" |
| @@ -8,12 +8,12 @@ | @@ -8,12 +8,12 @@ | ||
| 8 | 8 | ||
| 9 | #import <UIKit/UIKit.h> | 9 | #import <UIKit/UIKit.h> |
| 10 | #import "PNColor.h" | 10 | #import "PNColor.h" |
| 11 | -#import "UICountingLabel.h" | 11 | +#import <UICountingLabel/UICountingLabel.h> |
| 12 | 12 | ||
| 13 | -typedef NS_ENUM(NSUInteger, PNChartFormatType) { | 13 | +typedef NS_ENUM (NSUInteger, PNChartFormatType) { |
| 14 | - PNChartFormatTypePercent, | 14 | + PNChartFormatTypePercent, |
| 15 | - PNChartFormatTypeDollar, | 15 | + PNChartFormatTypeDollar, |
| 16 | - PNChartFormatTypeNone | 16 | + PNChartFormatTypeNone |
| 17 | }; | 17 | }; |
| 18 | 18 | ||
| 19 | #define DEGREES_TO_RADIANS(angle) ((angle) / 180.0 * M_PI) | 19 | #define DEGREES_TO_RADIANS(angle) ((angle) / 180.0 * M_PI) |
| @@ -33,6 +33,10 @@ | @@ -33,6 +33,10 @@ | ||
| 33 | 33 | ||
| 34 | @property (nonatomic) CGFloat xLabelWidth; | 34 | @property (nonatomic) CGFloat xLabelWidth; |
| 35 | 35 | ||
| 36 | +@property (nonatomic) UIFont *xLabelFont; | ||
| 37 | + | ||
| 38 | +@property (nonatomic) UIColor *xLabelColor; | ||
| 39 | + | ||
| 36 | @property (nonatomic) CGFloat yValueMax; | 40 | @property (nonatomic) CGFloat yValueMax; |
| 37 | 41 | ||
| 38 | @property (nonatomic) CGFloat yValueMin; | 42 | @property (nonatomic) CGFloat yValueMin; |
| @@ -41,6 +45,10 @@ | @@ -41,6 +45,10 @@ | ||
| 41 | 45 | ||
| 42 | @property (nonatomic) CGFloat yLabelHeight; | 46 | @property (nonatomic) CGFloat yLabelHeight; |
| 43 | 47 | ||
| 48 | +@property (nonatomic) UIFont *yLabelFont; | ||
| 49 | + | ||
| 50 | +@property (nonatomic) UIColor *yLabelColor; | ||
| 51 | + | ||
| 44 | @property (nonatomic) CGFloat chartCavanHeight; | 52 | @property (nonatomic) CGFloat chartCavanHeight; |
| 45 | 53 | ||
| 46 | @property (nonatomic) CGFloat chartCavanWidth; | 54 | @property (nonatomic) CGFloat chartCavanWidth; |
| @@ -49,7 +57,6 @@ | @@ -49,7 +57,6 @@ | ||
| 49 | 57 | ||
| 50 | @property (nonatomic) BOOL showLabel; | 58 | @property (nonatomic) BOOL showLabel; |
| 51 | 59 | ||
| 52 | - | ||
| 53 | /** | 60 | /** |
| 54 | * show CoordinateAxis ornot, Default is not | 61 | * show CoordinateAxis ornot, Default is not |
| 55 | */ | 62 | */ |
| @@ -65,4 +72,6 @@ | @@ -65,4 +72,6 @@ | ||
| 65 | */ | 72 | */ |
| 66 | @property (nonatomic, strong) NSString *yLabelFormat; | 73 | @property (nonatomic, strong) NSString *yLabelFormat; |
| 67 | 74 | ||
| 75 | +- (void)setXLabels:(NSArray *)xLabels withWidth:(CGFloat)width; | ||
| 76 | + | ||
| 68 | @end | 77 | @end |
This diff is collapsed. Click to expand it.
-
Please register or login to post a comment