What steps will reproduce the problem?
1. Create a CPBarPlot
2. Give the barOffset property a value other than zero
3. Make sure a label is generated for each bar by returning nil in the
datasource protocol method -(CPTextLayer *)barLabelForBarPlot:(CPBarPlot
*)plot recordIndex:(NSUInteger)index
Positioning of the labels should be above the offsetted bars. Instead the
labels are positioned without any offset.
FIX: CPBarPlot.m - addLabelLayers
Add the following lines of code in the main for-loop after the
initialization of the local variables tipPoint and basePoint:
CGFloat viewOffset = self.barOffset * self.barWidth;
if ( self.barsAreHorizontal ) {
basePoint.y += viewOffset;
tipPoint.y += viewOffset;
}
else {
basePoint.x += viewOffset;
tipPoint.x += viewOffset;
}
Original issue reported on code.google.com by robin....@gmail.com on 18 May 2010 at 7:58
Original issue reported on code.google.com by
robin....@gmail.com
on 18 May 2010 at 7:58