只是想知道是否有一种方法来旋转放置在条形图上的标签并添加偏移量?谢谢你。
在我的委托实现下面。注意标签
的内边距-(CPTLayer *)dataLabelForPlot:(CPTPlot *)plot recordIndex:(NSUInteger)index
{
CPTMutableTextStyle *whiteTextStyle = [[[CPTMutableTextStyle alloc] init] autorelease];
whiteTextStyle.color = [CPTColor whiteColor];
whiteTextStyle.fontSize = 14.0f;
CPTTextLayer *label = [[CPTTextLayer alloc] initWithText:@"Test" style:whiteTextStyle];
label.paddingLeft = -100.0f; // <---
return [label autorelease];
}
在plot上使用labelOffset
和labelRotation
属性。
CPTPlot
。在-dataLabelForPlot:recordIndex:
中不应该设置padding