我正在使用以下内容,但想根据我的计算值启动我的 x 轴,但是当我添加 visibleRange plotRangeWithLocation:CPTDecimalFromFloat(21) 时,它会从头开始消失。请帮助我。
x.majorIntervalLength = CPTDecimalFromString([NSString stringWithFormat:@"%d",(interval)]);
x.orthogonalCoordinateDecimal = CPTDecimalFromString(@"0");
x.minorTicksPerInterval = 2;
NSArray *exclusionRanges = [NSArray arrayWithObjects:
[CPTPlotRange plotRangeWithLocation:CPTDecimalFromFloat(0.01) length:CPTDecimalFromFloat(0.02)],
[CPTPlotRange plotRangeWithLocation:CPTDecimalFromFloat(0.00) length:CPTDecimalFromFloat(0.02)],
[CPTPlotRange plotRangeWithLocation:CPTDecimalFromFloat(0.00) length:CPTDecimalFromFloat(0.02)],
nil];
x.titleLocation = CPTDecimalFromString(@"0.0");
x.labelExclusionRanges = exclusionRanges;
x.titleOffset = 10.0;
x.visibleRange = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromFloat(0) length:CPTDecimalFromFloat(endPoint)];
谢谢,