Rename 'cycle' -> 'circle'.
Fix spelling of line chart point style enum value. People could otherwise search for 'circle' and not find anything, because of the misspelling.
Showing
3 changed files
with
8 additions
and
9 deletions
| @@ -285,8 +285,8 @@ | @@ -285,8 +285,8 @@ | ||
| 285 | int x = 2 * _chartMargin + (i * offSetX); | 285 | int x = 2 * _chartMargin + (i * offSetX); |
| 286 | int y = _chartCavanHeight - (innerGrade * _chartCavanHeight) + (_yLabelHeight / 2); | 286 | int y = _chartCavanHeight - (innerGrade * _chartCavanHeight) + (_yLabelHeight / 2); |
| 287 | 287 | ||
| 288 | - // cycle style point | 288 | + // Circular point |
| 289 | - if (chartData.inflexionPointStyle == PNLineChartPointStyleCycle) { | 289 | + if (chartData.inflexionPointStyle == PNLineChartPointStyleCircle) { |
| 290 | 290 | ||
| 291 | CGRect circleRect = CGRectMake(x - inflexionWidth / 2, y - inflexionWidth / 2, inflexionWidth, inflexionWidth); | 291 | CGRect circleRect = CGRectMake(x - inflexionWidth / 2, y - inflexionWidth / 2, inflexionWidth, inflexionWidth); |
| 292 | CGPoint circleCenter = CGPointMake(circleRect.origin.x + (circleRect.size.width / 2), circleRect.origin.y + (circleRect.size.height / 2)); | 292 | CGPoint circleCenter = CGPointMake(circleRect.origin.x + (circleRect.size.width / 2), circleRect.origin.y + (circleRect.size.height / 2)); |
| @@ -310,7 +310,7 @@ | @@ -310,7 +310,7 @@ | ||
| 310 | last_x = x; | 310 | last_x = x; |
| 311 | last_y = y; | 311 | last_y = y; |
| 312 | } | 312 | } |
| 313 | - // Square style point | 313 | + // Square point |
| 314 | else if (chartData.inflexionPointStyle == PNLineChartPointStyleSquare) { | 314 | else if (chartData.inflexionPointStyle == PNLineChartPointStyleSquare) { |
| 315 | 315 | ||
| 316 | CGRect squareRect = CGRectMake(x - inflexionWidth / 2, y - inflexionWidth / 2, inflexionWidth, inflexionWidth); | 316 | CGRect squareRect = CGRectMake(x - inflexionWidth / 2, y - inflexionWidth / 2, inflexionWidth, inflexionWidth); |
| @@ -338,7 +338,7 @@ | @@ -338,7 +338,7 @@ | ||
| 338 | last_x = x; | 338 | last_x = x; |
| 339 | last_y = y; | 339 | last_y = y; |
| 340 | } | 340 | } |
| 341 | - // Triangle style point | 341 | + // Triangular point |
| 342 | else if (chartData.inflexionPointStyle == PNLineChartPointStyleTriangle) { | 342 | else if (chartData.inflexionPointStyle == PNLineChartPointStyleTriangle) { |
| 343 | 343 | ||
| 344 | if ( i != 0 ) { | 344 | if ( i != 0 ) { |
| @@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
| 11 | typedef NS_ENUM(NSUInteger, PNLineChartPointStyle) { | 11 | typedef NS_ENUM(NSUInteger, PNLineChartPointStyle) { |
| 12 | 12 | ||
| 13 | PNLineChartPointStyleNone = 0, | 13 | PNLineChartPointStyleNone = 0, |
| 14 | - PNLineChartPointStyleCycle, | 14 | + PNLineChartPointStyleCircle, |
| 15 | PNLineChartPointStyleTriangle, | 15 | PNLineChartPointStyleTriangle, |
| 16 | PNLineChartPointStyleSquare | 16 | PNLineChartPointStyleSquare |
| 17 | }; | 17 | }; |
| @@ -29,9 +29,8 @@ typedef PNLineChartDataItem *(^LCLineChartDataGetter)(NSUInteger item); | @@ -29,9 +29,8 @@ typedef PNLineChartDataItem *(^LCLineChartDataGetter)(NSUInteger item); | ||
| 29 | @property (nonatomic, assign) PNLineChartPointStyle inflexionPointStyle; | 29 | @property (nonatomic, assign) PNLineChartPointStyle inflexionPointStyle; |
| 30 | 30 | ||
| 31 | /** | 31 | /** |
| 32 | - * if PNLineChartPointStyle is cycle, inflexionPointWidth equal cycle's diameter | 32 | + * If PNLineChartPointStyle is circle, this returns the circle's diameter. |
| 33 | - * if PNLineChartPointStyle is square, that means the foundation is square with | 33 | + * If PNLineChartPointStyle is square, each point is a square with each side equal in length to this value. |
| 34 | - * inflexionPointWidth long | ||
| 35 | */ | 34 | */ |
| 36 | @property (nonatomic, assign) CGFloat inflexionPointWidth; | 35 | @property (nonatomic, assign) CGFloat inflexionPointWidth; |
| 37 | 36 |
| @@ -68,7 +68,7 @@ | @@ -68,7 +68,7 @@ | ||
| 68 | PNLineChartData *data01 = [PNLineChartData new]; | 68 | PNLineChartData *data01 = [PNLineChartData new]; |
| 69 | data01.color = PNFreshGreen; | 69 | data01.color = PNFreshGreen; |
| 70 | data01.itemCount = lineChart.xLabels.count; | 70 | data01.itemCount = lineChart.xLabels.count; |
| 71 | - data01.inflexionPointStyle = PNLineChartPointStyleCycle; | 71 | + data01.inflexionPointStyle = PNLineChartPointStyleCircle; |
| 72 | data01.getData = ^(NSUInteger index) { | 72 | data01.getData = ^(NSUInteger index) { |
| 73 | CGFloat yValue = [data01Array[index] floatValue]; | 73 | CGFloat yValue = [data01Array[index] floatValue]; |
| 74 | return [PNLineChartDataItem dataItemWithY:yValue]; | 74 | return [PNLineChartDataItem dataItemWithY:yValue]; |
-
Please register or login to post a comment