title: SHLineGraphView - Set graph origin value
body: <p>Using <a href="https://github.com/grevolution/SHLineGraphView" rel="nofollow noreferrer">SHLineGraphView</a></p>
  
  <p>I want to specify the origin of my graph to a different value other than 0. </p>
  
  <p>The issue was already created here <a href="https://github.com/grevolution/SHLineGraphView/issues/5" rel="nofollow noreferrer">Min/Max draw Y axis</a> but the owner seems uninterested in solving it.</p>
  
  <p>This is what I have now</p>
  
  <pre><code>SHLineGraphView.m
  
  #define BOTTOM_MARGIN_TO_LEAVE 30.0
  #define TOP_MARGIN_TO_LEAVE 30.0
  #define INTERVAL_COUNT 10
  
  //INTERVAL_COUNT - 3 -&gt; Limits the y-axis to 60 but 
  //not the entire graph. 
  
  - (void)drawYLabels:(SHPlot *)plot {
    double yRange = [_yAxisRange doubleValue]; // this value will be in dollars
    double yIntervalValue = yRange / INTERVAL_COUNT;
    double intervalInPx = (self.bounds.size.height - BOTTOM_MARGIN_TO_LEAVE ) / (INTERVAL_COUNT - 3);
    NSLog(@"interval px %f",intervalInPx);
    NSMutableArray *labelArray = [NSMutableArray array];
    float maxWidth = 0;
  
  for(int i= 0; i &lt;= INTERVAL_COUNT - 3 ; i++){
  CGPoint currentLinePoint = CGPointMake(_leftMarginToLeave, i * intervalInPx);
  CGRect lableFrame = CGRectMake(0, currentLinePoint.y - (intervalInPx / 2), 100, intervalInPx);
    NSLog(@"label frame %f", lableFrame.origin.y);
  //if(i != 0) {
    UILabel *yAxisLabel = [[UILabel alloc] initWithFrame:lableFrame];
    yAxisLabel.backgroundColor = [UIColor clearColor];
    yAxisLabel.font = (UIFont *)_themeAttributes[kYAxisLabelFontKey];
    yAxisLabel.textColor = (UIColor *)_themeAttributes[kYAxisLabelColorKey];
    yAxisLabel.textAlignment = NSTextAlignmentCenter;
    float val = (yIntervalValue * (10 - i));
      NSLog(@"value %f", val);
    if(val &gt; 0){
      yAxisLabel.text = [NSString stringWithFormat:@"%.1i%@", (int)val, _yAxisSuffix];
    } else {
      yAxisLabel.text = [NSString stringWithFormat:@"%.0f", val];
    }
    [yAxisLabel sizeToFit];
    CGRect newLabelFrame = CGRectMake(0, currentLinePoint.y -     (yAxisLabel.layer.frame.size.height / 2), yAxisLabel.frame.size.width, yAxisLabel.layer.frame.size.height);
    yAxisLabel.frame = newLabelFrame;
  
    if(newLabelFrame.size.width &gt; maxWidth) {
      maxWidth = newLabelFrame.size.width;
    }
  
    [labelArray addObject:yAxisLabel];
    [self addSubview:yAxisLabel];
  //}
    }
  </code></pre>
  
  <hr>
  
  <pre><code>viewController.m
  
  _graphView.yAxisRange = @(200);
  </code></pre>
  
  <p>The y-axis is ok but the graph is still plotted from origin 0.</p>
  
  <p><img src="https://i.stack.imgur.com/F319h.png" alt=""></p>