글쎄, NSTimeInterval (double) 값을 전달하면서이 문제를 관리하려고했습니다. 월 01 2010 오후 1시 3분 55초 Y : 32
X : 5 월 05 2010 오후 7시 2분 55초의 Y : 20
자, 지혜로운 날을 표시하려고하면 그 쇼 그러나코어 플롯 - 데이터 플롯 값을 변경하지 않고 x 축 클래스 길이를 어떻게 바꿀 수 있습니까?
X를 가정 해 봅시다 정확한 결과. 내 코드는 자, 여기 코드 내가, 혼란의
xRange=[CPPlotRange plotRangeWithLocation:CPDecimalFromFloat(min) length:CPDecimalFromFloat(maxValue-min)];
xClassLength=[[NSString alloc]initWithFormat:@"%f",length]; //length=1
//here the max & min values are NSTimeInterval
CPXYAxis *x2 = [[(CPXYAxis *)[CPXYAxis alloc] initWithFrame:CGRectZero] autorelease];
x2.labelingPolicy = CPAxisLabelingPolicyAutomatic;
x2.orthogonalCoordinateDecimal=CPDecimalFromInteger(startPointY);
x2.minorTicksPerInterval = 0;
x2.majorTickLength=[xClassLength intValue];
x2.preferredNumberOfMajorTicks = 5;
x2.labelOffset = 10.0;
x2.coordinate = CPCoordinateX;
x2.plotSpace = graph.defaultPlotSpace;
x2.axisLineStyle = redLineStyle;
x2.majorTickLineStyle = redLineStyle;
x2.labelingPolicy=CPAxisLabelingPolicyAutomatic;
CPTimeFormatter *timeFormatter = [[[CPTimeFormatter alloc] initWithDateFormatter:xDateFormatter] autorelease];
timeFormatter.referenceDate = refDate; //refDate=May 01 2010 12:00 PM
x2.labelFormatter=timeFormatter;
x2.labelTextStyle=axisTitleTextStyle;
x2.visibleRange =xRange;
CPConstraints x2Constraints = {CPConstraintFixed, CPConstraintNone};
x2.isFloatingAxis = YES;
x2.constraints = x2Constraints;
// 끝입니다 내가하지만 다르게 X 클래스 길이와 동일한 데이터를 표시 할 경우; 3 시간을 보자. 내가 어디에서 변화를 만들어야하는지. 동일하게 안내해주세요. 감사합니다.