Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/115.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 核心图动态集xPlotRange_Ios_Objective C_Core Plot - Fatal编程技术网

Ios 核心图动态集xPlotRange

Ios 核心图动态集xPlotRange,ios,objective-c,core-plot,Ios,Objective C,Core Plot,我有一个图形,我需要在添加新元素的过程中更改它的xPlotRange。我怎么做 我试过这个: [self.hostView.hostedGraph.defaultPlotSpace setAllowsUserInteraction:YES]; long count=[array count]; 如果(计数>100&&count) long count = [array count]; if (count>100 && count<maxElements) [s

我有一个图形,我需要在添加新元素的过程中更改它的xPlotRange。我怎么做

我试过这个:

[self.hostView.hostedGraph.defaultPlotSpace 

setAllowsUserInteraction:YES];

long count=[array count];
如果(计数>100&&count)
long count = [array count];
if (count>100 && count<maxElements)
[self plotSpace:self.hostView.hostedGraph.defaultPlotSpace willChangePlotRangeTo:[CPTMutablePlotRange plotRangeWithLocation:@(0.0) length:[NSNumber numberWithInteger:count+100]] forCoordinate:CPTCoordinateX];
CPTXYPlotSpace *plotSpace = (CPTXYPlotSpace*)self.graph.defaultPlotSpace; plotSpace.allowsUserInteraction=YES; plotSpace.delegate = self;

plotSpace.xRange = [CPTPlotRange plotRangeWithLocationDecimal:CPTDecimalFromInt(xAxisMin)/*minimum x value*/ lengthDecimal:CPTDecimalFromInt()];

plotSpace.yRange = [CPTPlotRange plotRangeWithLocationDecimal:CPTDecimalFromInt(60) lengthDecimal:CPTDecimalFromInt(yAxisRange)];

[plotSpace setGlobalXRange:[CPTPlotRange plotRangeWithLocationDecimal:CPTDecimalFromInt(0) lengthDecimal:CPTDecimalFromInt(xAxisMax - xAxisMin)]];

[plotSpace setGlobalYRange:[CPTPlotRange plotRangeWithLocationDecimal:CPTDecimalFromInt([[_dict1 objectForKey:@"minValue"]intValue ]) lengthDecimal:CPTDecimalFromInt(yAxisRange)]];