Coreplot y轴标签问题

时间:2015-08-29 00:47:12

标签: ios8 core-plot scatter-plot ios7.1 xcode-6.2

我刚刚将core-plot从1.2升级到1.6。 y轴上的标签在iOS 8中拧紧。当为目标7.1运行相同的项目时工作正常。  有同样问题的人吗?

y.majorIntervalLength是150和

plotSpace.yRange = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromFloat(0.f) length:CPTDecimalFromFloat(2000.f)];

[![在此处输入图像说明] [1]] [1] [![此处输入图像说明] [2]] [2]

图。 iOS 8.2。图.iOS 7.1

// Axes config code
CPTXYAxisSet *axisSet = (CPTXYAxisSet *)_graph.axisSet;
CPTXYAxis *x = axisSet.xAxis;
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
dateFormatter.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0];
dateFormatter.dateStyle = kCFDateFormatterShortStyle;
CPTTimeFormatter *timeFormatter = [[CPTTimeFormatter alloc] initWithDateFormatter:dateFormatter];
timeFormatter.referenceDate = _startDate;
x.labelFormatter = timeFormatter;
x.labelTextStyle = textStyle;
x.majorIntervalLength = CPTDecimalFromFloat(DT_ONE_DAY*3);
x.minorTicksPerInterval = 2;

CPTXYAxis *y = axisSet.yAxis;
NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init];
numberFormatter.maximumSignificantDigits = 0;
y.labelFormatter = numberFormatter;
y.labelTextStyle = textStyle;
y.majorIntervalLength = CPTDecimalFromString(@"150");
y.minorTicksPerInterval = 1;

0 个答案:

没有答案