Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for slice stroke color #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
1 change: 1 addition & 0 deletions XYPieChart/XYPieChart.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
@property(nonatomic, strong) UIFont *labelFont;
@property(nonatomic, strong) UIColor *labelColor;
@property(nonatomic, strong) UIColor *labelShadowColor;
@property(nonatomic, strong) UIColor *sliceStrokeColor;
@property(nonatomic, assign) CGFloat labelRadius;
@property(nonatomic, assign) CGFloat selectedSliceStroke;
@property(nonatomic, assign) CGFloat selectedSliceOffsetRadius;
Expand Down
3 changes: 2 additions & 1 deletion XYPieChart/XYPieChart.m
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ @implementation XYPieChart
@synthesize labelColor = _labelColor;
@synthesize labelShadowColor = _labelShadowColor;
@synthesize labelRadius = _labelRadius;
@synthesize sliceStrokeColor = _sliceStrokeColor;
@synthesize selectedSliceStroke = _selectedSliceStroke;
@synthesize selectedSliceOffsetRadius = _selectedSliceOffsetRadius;
@synthesize showPercentage = _showPercentage;
Expand Down Expand Up @@ -616,7 +617,7 @@ - (SliceLayer *)createSliceLayer
{
SliceLayer *pieLayer = [SliceLayer layer];
[pieLayer setZPosition:0];
[pieLayer setStrokeColor:NULL];
[pieLayer setStrokeColor:self.sliceStrokeColor.CGColor];
CATextLayer *textLayer = [CATextLayer layer];
textLayer.contentsScale = [[UIScreen mainScreen] scale];
CGFontRef font = nil;
Expand Down