Merge pull request #244 from MendyK/master
Added decimal options for circle chart
Showing
2 changed files
with
9 additions
and
1 deletions
| @@ -13,7 +13,9 @@ | @@ -13,7 +13,9 @@ | ||
| 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 | + PNChartFormatTypeDecimal, | ||
| 18 | + PNChartFormatTypeDecimalTwoPlaces, | ||
| 17 | }; | 19 | }; |
| 18 | 20 | ||
| 19 | #define DEGREES_TO_RADIANS(angle) ((angle) / 180.0 * M_PI) | 21 | #define DEGREES_TO_RADIANS(angle) ((angle) / 180.0 * M_PI) |
| @@ -131,6 +131,12 @@ displayCountingLabel:(BOOL)displayCountingLabel | @@ -131,6 +131,12 @@ displayCountingLabel:(BOOL)displayCountingLabel | ||
| 131 | case PNChartFormatTypeDollar: | 131 | case PNChartFormatTypeDollar: |
| 132 | format = @"$%d"; | 132 | format = @"$%d"; |
| 133 | break; | 133 | break; |
| 134 | + case PNChartFormatTypeDecimal: | ||
| 135 | + format = @"%.1f"; | ||
| 136 | + break; | ||
| 137 | + case PNChartFormatTypeDecimalTwoPlaces: | ||
| 138 | + format = @"%.2f"; | ||
| 139 | + break; | ||
| 134 | case PNChartFormatTypeNone: | 140 | case PNChartFormatTypeNone: |
| 135 | default: | 141 | default: |
| 136 | format = @"%d"; | 142 | format = @"%d"; |
-
Please register or login to post a comment