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: 2 additions & 0 deletions WatchChart Extension/NKWatchChart/NKLineChart.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

@interface NKLineChart : NSObject

@property (nonatomic) CGRect frame;

// Background color of the chart
@property (nonatomic) UIColor *chartBackgroundColor;
// Array of `LineChartData` objects, one for each line.
Expand Down
8 changes: 7 additions & 1 deletion WatchChart Extension/NKWatchChart/NKLineChart.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

@interface NKLineChart ()

@property (nonatomic) CGRect frame;
@property (nonatomic) NSMutableArray *chartLineArray;

// Array of line path, one for each line.
Expand Down Expand Up @@ -71,6 +70,13 @@ - (void)setupDefaultValues
_axisWidth = 1.f;
}

- (void)setFrame:(CGRect)frame
{
_frame = frame;
_chartCavanWidth = frame.size.width - _chartMargin * 2;
_chartCavanHeight = frame.size.height - _chartMargin * 2;
}

#pragma mark - Draw Chart

- (UIImage *)drawImage
Expand Down