Skip to content

Commit

Permalink
merged
Browse files Browse the repository at this point in the history
  • Loading branch information
dhirenthirani committed May 17, 2017
2 parents c9c179e + 97bb9b5 commit 7515365
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dr-charts/Classes/LineChart/MultiLineGraphView.m
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ - (void)createYAxisLine{
}
}
NSAttributedString *attrString = [LegendView getAttributedString:numberString withFont:self.textFont];
CGSize size = [attrString boundingRectWithSize:CGSizeMake(WIDTH(self) - LEGEND_VIEW, MAXFLOAT) options:NSStringDrawingUsesFontLeading|NSStringDrawingUsesLineFragmentOrigin context:nil].size;
CGSize size = [attrString boundingRectWithSize:CGSizeMake(OFFSET_X, MAXFLOAT) options:NSStringDrawingUsesFontLeading|NSStringDrawingUsesLineFragmentOrigin context:nil].size;

[self drawLineForGridWithStartPoint:startPoint endPoint:endPoint text:numberString textFrame:CGRectMake(OFFSET_PADDING, HEIGHT(self.graphView) - (y + OFFSET_Y + size.height/2), size.width , size.height) drawGrid:drawGrid];
[self drawLineForGridWithStartPoint:startPoint endPoint:endPoint text:numberString textFrame:CGRectMake(1, HEIGHT(self.graphView) - (y + OFFSET_Y + size.height/2), OFFSET_X - 1, size.height) drawGrid:drawGrid];
}
}

Expand Down Expand Up @@ -737,6 +737,7 @@ - (void)drawLineForGridWithStartPoint:(CGPoint)startPoint endPoint:(CGPoint)endP
[textLayer setShouldRasterize:YES];
[textLayer setRasterizationScale:[[UIScreen mainScreen] scale]];
[textLayer setContentsScale:[[UIScreen mainScreen] scale]];
[textLayer setWrapped:YES];
[self.graphView.layer addSublayer:textLayer];
}

Expand Down

0 comments on commit 7515365

Please sign in to comment.