https://github.com/sunriseoyr/orcharts
饼状图、环形图、扇形图、曲线图、折线图
https://github.com/sunriseoyr/orcharts
chart charts ios library objective-c pie-chart
Last synced: 10 months ago
JSON representation
饼状图、环形图、扇形图、曲线图、折线图
- Host: GitHub
- URL: https://github.com/sunriseoyr/orcharts
- Owner: SunriseOYR
- License: mit
- Created: 2017-09-21T09:27:17.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-04-22T16:22:18.000Z (about 5 years ago)
- Last Synced: 2024-12-18T05:02:17.684Z (over 1 year ago)
- Topics: chart, charts, ios, library, objective-c, pie-chart
- Language: Objective-C
- Homepage:
- Size: 3.97 MB
- Stars: 155
- Watchers: 3
- Forks: 32
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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)
### RingChart

### LineChart
| Slider | Control |
|--------------|-------------|
|||
### Example Config
To run the example project.
| Ring | Line |
|--------------|-------------|
|  |  |
### 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)