为何在字符串标签中找不到 CPTAxisLabeling Policy 与 CPTAxisLabeling Policy 不同的标签?
x.labelingPolicy = CPTAxisLabelingPolicyNone;
""https://i.sstatic.net/xfTJs.png" alt="此处输入图像描述"/ >
我想要这个全球资源信息数据库LineStyle, 但用我的文字标签:
x.labelingPolicy = CPTAxisLabelingPolicyFixedInterval
""https://i.sstatic.net/aqRkv.png" alt="此处输入图像描述"/ >
我用这个代码完成了 xAxis标签 :
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];