# ORCharts
[](https://travis-ci.org/sunrise_oy@163.com/ORCharts)
[](https://cocoapods.org/pods/ORCharts)
[](https://cocoapods.org/pods/ORCharts)
[](https://cocoapods.org/pods/ORCharts)
## Table of contents
* [Screenshots](#screenshots)
* [Installation](#installation)
* [Setup](#setup)
# Screenshots
### RingChart

### LineChart
| Slider | Control |
|--------------|-------------|
|||
### Example Config
To run the example project.
| Ring | Line |
|--------------|-------------|
|  |  |
# Installation
### ORCharts
```ruby
pod 'ORCharts'
```
### Only Ring
```ruby
pod 'ORCharts/Ring'
```
### Only Line
```ruby
pod 'ORCharts/Line'
```
# Setup
## Use Interface Builder
1、 Drag an UIView object to ViewController Scene
2、 Change the `Custom Class` to `ORLineChartView` or `ORRingChartView`
3、 Link `dataSource` and `delegate` to the ViewController
## Or use code
```objc
@property (nonatomic, strong) ORRingChartView *ringChartView;
```
```objc
_ringChartView = [[ORRingChartView alloc] initWithFrame:CGRectMake(0, 0, 375, 375)];
_ringChartView.dataSource = self;
[self.view addSubview:_ringChartView];
```
```objc
@property (nonatomic, strong) ORLineChartView *lineChartView;
```
```objc
_lineChartView = [[ORLineChartView alloc] initWithFrame:CGRectMake(0, 0, 375, 350)];
_lineChartView.dataSource = self;
_lineChartView.delegate = self;
[self.view addSubview:_lineChartView];
```
## reloadData
reloadData when data or config changed, see more usage and config in example
```objc
[_ringChartView reloadData];
```
```objc
[_lineChartView reloadData];
```
## dataSource && delegate && config
Refer to the Example Or Click the link below
* [ORCharts:Ring](https://www.jianshu.com/p/317a79890984)
* [ORCharts:Line](https://www.jianshu.com/p/a571ae110ba5)
## License
ORCharts is available under the MIT license. See the LICENSE file for more info.
### [中文简书](https://www.jianshu.com/p/6f65bf7dfbbf)