Showing
3 changed files
with
5 additions
and
13 deletions
| @@ -123,7 +123,7 @@ | @@ -123,7 +123,7 @@ | ||
| 123 | 123 | ||
| 124 | _currentTotal += currentDataItem.value; | 124 | _currentTotal += currentDataItem.value; |
| 125 | 125 | ||
| 126 | - NSString *titleText = currentDataItem.description; | 126 | + NSString *titleText = currentDataItem.textDescription; |
| 127 | if(!titleText){ | 127 | if(!titleText){ |
| 128 | titleText = [NSString stringWithFormat:@"%.0f%%",currentDataItem.value/ _total * 100]; | 128 | titleText = [NSString stringWithFormat:@"%.0f%%",currentDataItem.value/ _total * 100]; |
| 129 | } | 129 | } |
| @@ -17,8 +17,8 @@ | @@ -17,8 +17,8 @@ | ||
| 17 | color:(UIColor*)color | 17 | color:(UIColor*)color |
| 18 | description:(NSString *)description; | 18 | description:(NSString *)description; |
| 19 | 19 | ||
| 20 | -@property (nonatomic, readonly) CGFloat value; | 20 | +@property (nonatomic) CGFloat value; |
| 21 | -@property (nonatomic, readonly) UIColor *color; | 21 | +@property (nonatomic) UIColor *color; |
| 22 | -@property (nonatomic, readonly) NSString *description; | 22 | +@property (nonatomic) NSString *textDescription; |
| 23 | 23 | ||
| 24 | @end | 24 | @end |
| @@ -8,14 +8,6 @@ | @@ -8,14 +8,6 @@ | ||
| 8 | 8 | ||
| 9 | #import "PNPieChartDataItem.h" | 9 | #import "PNPieChartDataItem.h" |
| 10 | 10 | ||
| 11 | -@interface PNPieChartDataItem() | ||
| 12 | - | ||
| 13 | -@property (nonatomic, readwrite) CGFloat value; | ||
| 14 | -@property (nonatomic, readwrite) UIColor *color; | ||
| 15 | -@property (nonatomic, readwrite) NSString *description; | ||
| 16 | - | ||
| 17 | -@end | ||
| 18 | - | ||
| 19 | @implementation PNPieChartDataItem | 11 | @implementation PNPieChartDataItem |
| 20 | 12 | ||
| 21 | 13 | ||
| @@ -31,7 +23,7 @@ | @@ -31,7 +23,7 @@ | ||
| 31 | color:(UIColor*)color | 23 | color:(UIColor*)color |
| 32 | description:(NSString *)description{ | 24 | description:(NSString *)description{ |
| 33 | PNPieChartDataItem *item = [PNPieChartDataItem dataItemWithValue:value color:color]; | 25 | PNPieChartDataItem *item = [PNPieChartDataItem dataItemWithValue:value color:color]; |
| 34 | - item.description = description; | 26 | + item.textDescription = description; |
| 35 | return item; | 27 | return item; |
| 36 | } | 28 | } |
| 37 | 29 |
-
Please register or login to post a comment