{"id":865,"url":"https://github.com/cagricolak/CoreCharts","last_synced_at":"2025-07-30T19:32:56.196Z","repository":{"id":56906650,"uuid":"130605149","full_name":"cagricolak/CoreCharts","owner":"cagricolak","description":"Core Charts | Basic Scrollable Chart Library for iOS","archived":false,"fork":false,"pushed_at":"2019-12-02T07:33:55.000Z","size":332,"stargazers_count":71,"open_issues_count":0,"forks_count":10,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-12-01T15:23:27.729Z","etag":null,"topics":["barchart","chart","charts","cocoapods","corecharts","ios","swift-library"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cagricolak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-22T20:32:19.000Z","updated_at":"2024-09-07T13:22:09.000Z","dependencies_parsed_at":"2022-08-20T19:50:21.843Z","dependency_job_id":null,"html_url":"https://github.com/cagricolak/CoreCharts","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cagricolak%2FCoreCharts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cagricolak%2FCoreCharts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cagricolak%2FCoreCharts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cagricolak%2FCoreCharts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cagricolak","download_url":"https://codeload.github.com/cagricolak/CoreCharts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228178967,"owners_count":17881114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["barchart","chart","charts","cocoapods","corecharts","ios","swift-library"],"created_at":"2024-01-05T20:15:33.328Z","updated_at":"2024-12-04T19:32:13.617Z","avatar_url":"https://github.com/cagricolak.png","language":"Swift","funding_links":[],"categories":["Charts"],"sub_categories":["Getting Started"],"readme":"# Core Charts | Basic Chart Library for iOS\n[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/CoreCharts.svg)](https://img.shields.io/cocoapods/v/CoreCharts.svg)\n![CocoaPods Compatible](https://img.shields.io/badge/Platform-iOS-lightgrey.svg)\n\n\n| HCoreBarChart  | VCoreBarChart |\n| ------------- | ------------- |\n| \u003cimg src=\"https://github.com/cagricolak/CoreCharts/blob/master/docs/showcase.png\" width=\"400\" height=\"300\"\u003e  | \u003cimg src=\"https://github.com/cagricolak/CoreCharts/blob/master/docs/showcase2.png\" width=\"400\" height=\"300\"\u003e |\n\n\n\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Appearance Customization](appearance-customization)\n\n## Getting Started\n\nYou need a Cocoapods installed mac, if you are not familiar that visit here [CocoaPods](https://guides.cocoapods.org/using/getting-started.html#getting-started)\n\n\n### Requirements\n\n* XCode 8.3+\n* iOS 9.3+\n\n\n### Installation\n\nAdd your pod file \n```\npod 'CoreCharts'\n```\nand than hit the your command line\n```\npod install \n```\n\nnow you are ready to use CoreCharts\n\n\n\n## Usage\n\nimport where you want to use\n\n```swift\nimport CoreCharts\n\n```\n\nand 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\n\n![alt text](https://github.com/cagricolak/CoreCharts/blob/master/docs/Storyboard-usage.png \"Storyboard reference\")\n\n\n\nreferance it!\n```swift\n@IBOutlet weak var barChart: VCoreBarChart!\n```\n\nmost important setup is ready, now you can use some of featuristic CoreChart's properties.\n\n\n\nfirstly you need conform your class to data source protocol, \n\n```swift\nclass DemoViewController: UIViewController,CoreChartViewDataSource {\n\n    @IBOutlet weak var barChart: VCoreBarChart!\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        \n        barChart.dataSource = self\n    }\n```\n\n\nnow, you have two methods, implement it.\n\n```swift\nfunc loadCoreChartData() -\u003e [CoreChartEntry]\n\noptional func didTouch(entryData: CoreChartEntry)\n```\n\nloadCoreChartData method is fill your bar charts, you need to convert your data to CoreChartEntry type\n\n\n```swift\nfunc loadCoreChartData() -\u003e [CoreChartEntry] {\n\n        var allCityData = [CoreChartEntry]()\n    \n        let cityNames = [\"Istanbul\",\"Antalya\",\"Ankara\",\"Trabzon\",\"İzmir\"]\n    \n        let plateNumber = [34,07,06,61,35]\n        \n        for index in 0..\u003ccityNames.count {\n            \n            let newEntry = CoreChartEntry(id: \"\\(plateNumber[index])\", \n                                          barTitle: cityNames[index], \n                                          barHeight: Double(plateNumber[index]), \n                                          barColor: rainbowColor())\n                                          \n                                          \n            allCityData.append(newEntry)\n            \n        }\n        \n        return allCityData\n\n}\n\n```\n\n\n### CoreChartEntry properties\n* id = when you are use didTouch method and you want to access some data level for bar selection you need here.\n* barTitle = ... you now what it is :)\n* ..and the rest..\n\n\nOne more thing..\n\n```swift\noptional func didTouch(entryData: CoreChartEntry)\n```\n\nthis method is optional and when you want to navigate your chart screens each other through selected your data level \n#### data level means: Running a query on your data structures with id\n\n### Finish.\n\nHere is the full code as you have just been told, and already in the demo project.\n\n```swift\nimport CoreCharts\n\nclass DemoViewController: UIViewController,CoreChartViewDataSource {\n\n    @IBOutlet weak var barChart: VCoreBarChart!\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        \n        barChart.dataSource = self\n    }\n    \n    func didTouch(entryData: CoreChartEntry) {\n        print(entryData.barTitle)\n    }\n    \n    func loadCoreChartData() -\u003e [CoreChartEntry] {\n        \n        return getTurkeyFamouseCityList()\n        \n    }\n    \n    \n    func getTurkeyFamouseCityList()-\u003e[CoreChartEntry] {\n        var allCityData = [CoreChartEntry]()\n        let cityNames = [\"Istanbul\",\"Antalya\",\"Ankara\",\"Trabzon\",\"İzmir\"]\n        let plateNumber = [34,07,06,61,35]\n        \n        for index in 0..\u003ccityNames.count {\n            \n            let newEntry = CoreChartEntry(id: \"\\(plateNumber[index])\", \n                                          barTitle: cityNames[index], \n                                          barHeight: Double(plateNumber[index]), \n                                          barColor: rainbowColor())\n                                          \n                                         \n            allCityData.append(newEntry)\n            \n        }\n        \n        return allCityData\n        \n    }\n \n}\n```\n\n## Appearance Customization\n### CoreBarChartsDisplayConfig Class\n\nYou can change ui appearance for charts with CoreBarChartsDisplayConfig class and there have properties, here is the how to do this.\n\n#### Direct use\nYou can use one shot initializer\n```swift\nimport CoreCharts\n\nclass DemoViewController: UIViewController,CoreChartViewDataSource {\n\n    @IBOutlet weak var barChart: VCoreBarChart!\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        \n        barChart.dataSource = self\n        \n        barChart.displayConfig = CoreBarChartsDisplayConfig(barWidth: 40.0,\n                                                            barSpace: 20.0,\n                                                            bottomSpace: 20.0,\n                                                            topSpace: 20.0,\n                                                            backgroundColor: UIColor.black,\n                                                            titleFontSize: 12,\n                                                            valueFontSize: 14,\n                                                            titleFont: UIFont(),\n                                                            valueFont: UIFont(),\n                                                            titleLength: 12)\n    }\n\n```\n\n#### Spesific use\n\nYou can use only what you just need.\n\n```swift\nimport CoreCharts\n\nclass DemoViewController: UIViewController,CoreChartViewDataSource {\n\n    @IBOutlet weak var barChart: VCoreBarChart!\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        \n        barChart.dataSource = self\n        \n        bbarChart.displayConfig.barWidth = 10\n        barChart.displayConfig.barSpace = 20\n        barChart.displayConfig.titleFontSize = 15\n    }\n\n```\n\n\n## Contribute are Welcome 🎉\n\n## Versioning\n\nWe use [SemVer](http://semver.org/) for versioning. For the versions available, see the [CoreCharts Tagi wagi](https://github.com/cagricolak/CoreCharts/tags). \n\n## Authors\n\n* **Çağrı ÇOLAK** - *Sr.iOS Developer* - [Github](https://github.com/cagricolak)\n* **Kemal TÜRK** - *jr.iOS Developer / Android Developer* - [Github](https://github.com/kmltrk)\n\n## License\n\nThis project is licensed under the MIT - see the [LICENSE.md](LICENSE.md) file for details\n\n## Bug Report\n\n* if you catch some bug please use add issue section.\n\n## Add new feature\n\n* you can write a suggestion for the next new feature in the project section.\n\n## Other My Repos\n- [TextSphere](https://github.com/cagricolak/TextSphere) - TextSphere is a small framework for customized TextView\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcagricolak%2FCoreCharts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcagricolak%2FCoreCharts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcagricolak%2FCoreCharts/lists"}