Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cagricolak/CoreCharts
Core Charts | Basic Scrollable Chart Library for iOS
https://github.com/cagricolak/CoreCharts
barchart chart charts cocoapods corecharts ios swift-library
Last synced: about 1 month ago
JSON representation
Core Charts | Basic Scrollable Chart Library for iOS
- Host: GitHub
- URL: https://github.com/cagricolak/CoreCharts
- Owner: cagricolak
- License: mit
- Created: 2018-04-22T20:32:19.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-02T07:33:55.000Z (about 5 years ago)
- Last Synced: 2024-12-01T15:23:27.729Z (about 1 month ago)
- Topics: barchart, chart, charts, cocoapods, corecharts, ios, swift-library
- Language: Swift
- Homepage:
- Size: 324 KB
- Stars: 71
- Watchers: 8
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - CoreCharts - CoreCharts is a simple powerful yet Charts library for apple products. (Charts)
- awesome-ios-star - CoreCharts - CoreCharts is a simple powerful yet Charts library for apple products. (Charts)
- fucking-awesome-ios - CoreCharts - CoreCharts is a simple powerful yet Charts library for apple products. (Charts)
- fucking-awesome-ios - CoreCharts - CoreCharts is a simple powerful yet Charts library for apple products. (Charts)
README
# Core Charts | Basic Chart Library for iOS
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/CoreCharts.svg)](https://img.shields.io/cocoapods/v/CoreCharts.svg)
![CocoaPods Compatible](https://img.shields.io/badge/Platform-iOS-lightgrey.svg)| HCoreBarChart | VCoreBarChart |
| ------------- | ------------- |
| | |- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
- [Appearance Customization](appearance-customization)## Getting Started
You need a Cocoapods installed mac, if you are not familiar that visit here [CocoaPods](https://guides.cocoapods.org/using/getting-started.html#getting-started)
### Requirements
* XCode 8.3+
* iOS 9.3+### Installation
Add your pod file
```
pod 'CoreCharts'
```
and than hit the your command line
```
pod install
```now you are ready to use CoreCharts
## Usage
import where you want to use
```swift
import CoreCharts```
and than open up your storyboard or xib file and add new UIView drop your main view. afterwards change subclass to Vertical for VCoreBarChart or Horizontal chart for HCoreBarChart
![alt text](https://github.com/cagricolak/CoreCharts/blob/master/docs/Storyboard-usage.png "Storyboard reference")
referance it!
```swift
@IBOutlet weak var barChart: VCoreBarChart!
```most important setup is ready, now you can use some of featuristic CoreChart's properties.
firstly you need conform your class to data source protocol,
```swift
class DemoViewController: UIViewController,CoreChartViewDataSource {@IBOutlet weak var barChart: VCoreBarChart!
override func viewDidLoad() {
super.viewDidLoad()
barChart.dataSource = self
}
```now, you have two methods, implement it.
```swift
func loadCoreChartData() -> [CoreChartEntry]optional func didTouch(entryData: CoreChartEntry)
```loadCoreChartData method is fill your bar charts, you need to convert your data to CoreChartEntry type
```swift
func loadCoreChartData() -> [CoreChartEntry] {var allCityData = [CoreChartEntry]()
let cityNames = ["Istanbul","Antalya","Ankara","Trabzon","İzmir"]
let plateNumber = [34,07,06,61,35]
for index in 0.. [CoreChartEntry] {
return getTurkeyFamouseCityList()
}
func getTurkeyFamouseCityList()->[CoreChartEntry] {
var allCityData = [CoreChartEntry]()
let cityNames = ["Istanbul","Antalya","Ankara","Trabzon","İzmir"]
let plateNumber = [34,07,06,61,35]
for index in 0..