title: Coreplot: Setting length of global range not working
body: <p>To start with, I have a graph(Coreplot Linechart). I have set the x-range and y-range of the defaultPlotspace of the graph. </p>
  
  <pre><code>- (void) setUpXRangeForPlotspace:(CPTXYPlotSpace *) plotSpace {
  
  int rangeLength = [self xRangeLength];
  plotSpace.xRange = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromFloat(- 0.5f)    length:CPTDecimalFromFloat(rangeLength + 1.0)];
  
  }
  
  - (void) setUpYRangeForPlotspace:(CPTXYPlotSpace *) plotSpace {
  
      float maxValue = [self maximumYValue];
  
      // length = maxvalue + (10% of maxvalue);
      plotSpace.yRange = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromFloat(0.0f)     length:CPTDecimalFromFloat(maxValue + (maxValue/10.0))];
  }
  </code></pre>
  
  <p>Now my task was to show a portion (region) of a graph along the x-axis according to user interaction. For that I was changing the globalXRange of plotspace. </p>
  
  <p>I took two textfields from which I was getting the location and length. <strong>btnAction:</strong> method is fired when a button is pressed.</p>
  
  <pre><code>- (void) btnAction:(id) sender {
  
      float txt1fl = [txt1.text floatValue];
      float txt2fl = [txt2.text floatValue];
  
  
      NSLog(@"txt1fl : %f, txt2fl : %f",txt1fl,txt2fl);
  
      CPTXYPlotSpace *plotSpace = (CPTXYPlotSpace *)graph.defaultPlotSpace;
  
      [plotSpace setGlobalXRange:[CPTPlotRange plotRangeWithLocation:CPTDecimalFromFloat(txt1fl)  length:(CPTDecimalFromFloat(txt2fl))]];
      [plotSpace setGlobalYRange:plotSpace.globalYRange];
  
      NSLog(@"Graph Global x:%f   length:%f",CPTDecimalFloatValue(plotSpace.globalXRange.location),CPTDecimalFloatValue(plotSpace.globalXRange.length));
  
  }
  </code></pre>
  
  <p>When I change the <strong>location</strong> of range and leave the <strong>length</strong> like that, the graph is showing the appropriate region. That is, it is scrolling to the location mentioned by the number.</p>
  
  <p>And even when I am changing the <strong>length</strong> of the globalXRange from a <strong>higher</strong> to a <strong>lower</strong> value - for example, changing length from 5.0 to 3.0 - the graph is showing the appropriate portion. That is, it is showing a smaller region in the bigger picture.</p>
  
  <p>But when I change the length of the globalXRange from <strong>lower</strong> to <strong>higher</strong> - for example, changing length 3.0 to 5.0 - the range of the graph is not increasing. </p>
  
  <p>After setting the range I checked using NSLog if the globalXRange's length has changed or not. Surprisingly the length has changed according to NSLog but visually the graph has not moved nor changed its range. </p>
  
  <p>I am unable to work out the solution. please help me with this. Thanks in advance.</p>