<commit_before>LFLineChartView
===============

A view to show line charts on iOS<commit_msg>Basic README updated<commit_after>LFLineChartView
===============

A view to show line charts on iOS

Screenshot

##Requirements

* Xcode 5 (or higher)
* Apple LLVM compiler
* ARC
* iOS 6.0 (or higher)

##Demo

Build and run `LFLineChartViewExample` project, available in the `Example/Storyboard/` folder.

##Installation

Recommended way to install LFLineChartView is via [CocoaPods](http://cocoapods.org/). Add the following line to your Podfile:

```ruby
pod 'LFLineChartView', '~> 0.1'
```

Install it:

```sh
$ pod install
```

Then open your workspace.

##Usage

To use LFLineChartView you need to inherit from `LFLineChartView`. This component uses datasource & delegate approach to provide content, so you need to implement those two protocols, even in the same inherited class.

_.h_
```objc
@interface LFExampleLineChartView : LFLineChartView <LFLineChartViewDataSource, LFLineChartViewDelegate>

@end
```

###Datasource
Datasource provides content for the chart. Currently, only one set of points is supported.

```objc
@protocol LFLineChartViewDataSource <NSObject>

- (NSUInteger) numberOfItemsInLineChartView:(LFLineChartView *)lineChartView;
- (CAShapeLayer *) lineChartView:(LFLineChartView *)lineChartView createLayerAtIndex:(NSUInteger) index;
- (CAShapeLayer *) lineChartView:(LFLineChartView *)lineChartView createLineLayerBetweenIndex:(NSUInteger) firstIndex andIndex:(NSUInteger) secondIndex;

- (CGFloat) yAtIndex:(NSUInteger) index;

@optional
// Size
- (CGFloat) sizeAtIndex:(NSUInteger) index;

// Text
- (NSString *) textAtIndex:(NSUInteger) index;
- (UIColor *) textColor;

// Lines
- (NSUInteger) numberOfMiddleLinesInLineChartView:(LFLineChartView *)lineChartView;
- (CAShapeLayer *) lineChartView:(LFLineChartView *)lineChartView createMiddleLineLayerAtIndex:(NSUInteger)index;
- (CGFloat) yForMiddleLineAtIndex:(NSUInteger) index;

// Empty view
- (UIView *) emptyViewForLineChartView:(LFLineChartView *)lineChartView;

@end
```

###Delegate
Delegate handles events from the chart. Currently, only touch on items is supported.

```objc
@protocol LFLineChartViewDelegate <NSObject>

@optional
- (void) lineChartView:(LFLineChartView *)lineChartView didPressLayerAtIndex:(NSUInteger) index;

@end
```

###Customization
More options are available to customize LFLineChartView. You can set those directly in the `init`/`initWithFrame`/`initWithCoder`/`etc.` method where you instantiate the inherited class.

```objc
@property (assign) CGFloat bounceTolerance;
@property (assign) CGFloat horizontalPadding;
@property (assign) CGFloat verticalPadding;
@property (assign) CGFloat itemSpacing;
@property (assign) CGFloat initialScale;

@property (assign) CGFloat minimumItemRadius;
@property (assign) CGFloat maximumItemRadius;

@property (assign) CGFloat minimumTextHeight;
@property (assign) CGFloat textHeight;
@property (assign) CGFloat textWidth;
```

You can find more information on how to implement those methods in the **example**.

##Contact
<NAME>

* http://github.com/leonardfactory
* http://twitter.com/leonardfactory
* <EMAIL>

##License
Copyright (c) 2013 <NAME>

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.




{'fraction_non_alphanumeric': 0.09282500591996211, 'fraction_numerical': 0.002131186360407293, 'mean_word_length': 6.075376884422111, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1102653', 'n_tokens_mistral': 1283, 'n_tokens_neox': 1205, 'n_words': 454}