为什么在字符串标签中找不到与 CPTAxisLabelingPolicyNone 不同的 labelingPolicy ???
x.labelingPolicy = CPTAxisLabelingPolicyNone;
我想要这个 GRIDLineStyle,但带有我的文本标签:
x.labelingPolicy = CPTAxisLabelingPolicyFixedInterval
我使用以下代码完成 xAxisLabels:
NSMutableArray *labels = [[NSMutableArray alloc] initWithCapacity:[labelsAxisX count]];
int idx = 0;
for (NSString *product in labelsAxisX)
{
CPTAxisLabel *label = [[CPTAxisLabel alloc] initWithText:product textStyle:x.labelTextStyle];
label.tickLocation = CPTDecimalFromInt(idx);
label.offset = 5.0f;
[labels addObject:label];
[label release];
idx++;
}
x.axisLabels = [NSSet setWithArray:labels];
[labels release];