EasyCharts
A simple chart lib used for iOS (swift). :-) Objective-c
Requirements
- ARC
- iOS>=8.0
- iPhone || iPad
- Xcode 8.0 or later
Features
- BrokenLineChart
- PieChart
- ProgressChart
- BarGraph
- RadarMap
Continuously updating ...…
Installation
At present
- by cloning the project into your repository
Usage
The following describes the basic use of several graphs.
PieChart
Initialization--Just transfer frame
.
var pieChartView : ECPieChartView!
pieChartView = ECPieChartView.init(frame: CGRect(x: 0, y: 100, width: ECScreenW, height: 260))
self.view.addSubview(pieChartView)
Data filling:Three parameters:percentList、colorList、arcTextList]
pieChartView.drawPieChart(percentList: self.percentList,
colorList: self.colorList,
arcTextList: self.arcTextList)
The effect of PieChart:
RadarChartView
Initialization--Just transfer frame
.
var radarChartView : RadarChartView!
radarChartView = RadarChartView.init(frame:CGRect(x: 40, y: 120, width: 280, height: 200))
self.view.addSubview(radarChartView)
Data filling:
let radarChartConfig = RadarChartConfig()
radarChartConfig.radius = 110
radarChartConfig.drawLineTitleList = ["Execution","Thinking","Endurance","Speed","Power","Technology"]
radarChartConfig.drawPointList = [[(0.3),(0.6),(0.8),(0.2),(0.5),(0.3)],[(0.6),(0.1),(0.4),(0.8),(0.2),(0.9)]]
radarChartConfig.drawLineColorList = [UIColor.orange, UIColor.red]
radarChartView.setupRadarChartConfig(radarChartConfig: radarChartConfig)
let radarChartConfig = RadarChartConfig()
radarChartConfig.radius = 110
radarChartConfig.drawLineTitleList = ["Execution","Thinking","Endurance","Speed","Power"]
radarChartConfig.drawPointList = [[(0.3),(0.6),(0.8),(0.2),(0.5)]]
radarChartConfig.drawLineColorList = [UIColor.orange]
radarChartView.setupRadarChartConfig(radarChartConfig: radarChartConfig)
The effect of PieChart:
ProgressView
Initialization--Just transfer frame
.
self.progressView = ECProgressChartView.init(frame: CGRect(x: (ECScreenW - 200) * 0.5,
y: 100,
width: 200,
height: 200))
self.view.addSubview(progressView!)
Data filling:
let progress = CGFloat(arc4random_uniform(100)) / 100.0
self.progressView?.resetProgress(progress: progress)
The effect of ProgressView:
Communication
- If you found a bug, and can provide steps to reliably reproduce it, open an issue.
- If you have a feature request, open an issue.
- If you want to contribute, submit a pull request.