Boris-Em/BEMSimpleLineGraph — pull request #102 by adonishi (2014-11-15 08:14:30+00:00)
Title: Multiple lines support

I made a initial multiline support, but with some limitation.
* number of points in each lines must be same.
* touch/popup only occur in first line.

I try to use multiline header code in überfeature branch as far as I can. and try not to interfere current user of BEMSimpleLineGraph. Hope this help.

# Document
## Multi-line support
To use multi-line support in BEMSimpleLineGraph, define following methods in datasource/delegate.
Currently number of points in each line must be same. and touch-report/popup will be shown only on a first line.

### Number of Lines on the Graph
Implement this method in datasource to specify the number of line to be displayed in your graph.
```
- (NSInteger)numberOfLinesInLineGraph:(BEMSimpleLineGraphView *)graph {
return 2;
}
```

### Graph Values and Points
Specify values and points to each line by using the method. additional parameter to one-line version of this method is ‘line’, and is a index number of line.
```
- (CGFloat)lineGraph:(BEMSimpleLineGraphView *)graph valueForPointAtIndex:(NSInteger)index line:(NSInteger)lineIndex {
if (lineIndex == 1) {
return [[self.arrayOfValues2 objectAtIndex:index] floatValue];
}
return [[self.arrayOfValues objectAtIndex:index] floatValue];
}
```

### Additional configuration on Line appearance.
By default all Line appearance settings are same. but you can change them by implement this method in delegate. Note that line of index 0 will be drawn first (behind), so if you set background/fill setting of line 1 or grater to non-transparent value, line behind will be hidden.
```
- (void)additionalSetupForLine:(BEMLine *)line lineGraph:(BEMSimpleLineGraphView *)graph;
if (line.index == 1) {
line.color = [UIColor yellowColor];
line.topColor = [UIColor clearColor];
line.bottomAlpha = 0.2;
}
}
```