Skip to content

饼状图、环形图、扇形图、曲线图、折线图

License

Notifications You must be signed in to change notification settings

SunriseOYR/ORCharts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ORCharts

CI Status Version License Platform

Table of contents

Screenshots

RingChart

RingChart

LineChart

Slider Control
Slider Control

Example Config

To run the example project.

Ring Line
Config 101.gif

Installation

ORCharts

pod 'ORCharts'

Only Ring

pod 'ORCharts/Ring'  

Only Line

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

@property (nonatomic, strong) ORRingChartView *ringChartView;
_ringChartView = [[ORRingChartView alloc] initWithFrame:CGRectMake(0, 0, 375, 375)];
_ringChartView.dataSource = self;
[self.view addSubview:_ringChartView];

@property (nonatomic, strong) ORLineChartView *lineChartView;
_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

[_ringChartView reloadData];
[_lineChartView reloadData];

dataSource && delegate && config

Refer to the Example Or Click the link below

License

ORCharts is available under the MIT license. See the LICENSE file for more info.