Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PNChart/PNLineChart.m
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ - (CATextLayer *)createPointLabelFor:(CGFloat)grade pointCenter:(CGPoint)pointCe
CATextLayer *textLayer = [[CATextLayer alloc] init];
[textLayer setAlignmentMode:kCAAlignmentCenter];
[textLayer setForegroundColor:[chartData.pointLabelColor CGColor]];
[textLayer setBackgroundColor:[[[UIColor whiteColor] colorWithAlphaComponent:0.8] CGColor]];
[textLayer setBackgroundColor:[chartData.pointLabelBackgroundColor CGColor]];
[textLayer setCornerRadius:textLayer.fontSize / 8.0];

if (chartData.pointLabelFont != nil) {
Expand Down
1 change: 1 addition & 0 deletions PNChart/PNLineChartData.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ typedef PNLineChartDataItem *(^LCLineChartDataGetter)(NSUInteger item);

@property (nonatomic) BOOL showPointLabel;
@property (nonatomic) UIColor *pointLabelColor;
@property(nonatomic,retain) UIColor* pointLabelBackgroundColor;
@property (nonatomic) UIFont *pointLabelFont;
@property (nonatomic) NSString *pointLabelFormat;

Expand Down
1 change: 1 addition & 0 deletions PNChart/PNLineChartData.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ - (void)setupDefaultValues
_alpha = 1.f;
_showPointLabel = NO;
_pointLabelColor = [UIColor blackColor];
_pointLabelBackgroundColor = [[UIColor whiteColor] colorWithAlphaComponent:0.8];
_pointLabelFormat = @"%1.f";
}

Expand Down