{"id":15037676,"url":"https://github.com/hadiidbouk/chartprogressbar-ios","last_synced_at":"2025-10-04T03:31:47.217Z","repository":{"id":56905800,"uuid":"106693910","full_name":"hadiidbouk/ChartProgressBar-iOS","owner":"hadiidbouk","description":"Draw a chart with progress bar style","archived":true,"fork":false,"pushed_at":"2018-01-24T09:23:06.000Z","size":350,"stargazers_count":82,"open_issues_count":2,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-18T10:27:32.615Z","etag":null,"topics":["chart","progressbar","swift-3"],"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/hadiidbouk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-12T13:05:39.000Z","updated_at":"2024-08-20T03:39:28.000Z","dependencies_parsed_at":"2022-08-20T19:20:26.577Z","dependency_job_id":null,"html_url":"https://github.com/hadiidbouk/ChartProgressBar-iOS","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/hadiidbouk/ChartProgressBar-iOS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadiidbouk%2FChartProgressBar-iOS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadiidbouk%2FChartProgressBar-iOS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadiidbouk%2FChartProgressBar-iOS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadiidbouk%2FChartProgressBar-iOS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hadiidbouk","download_url":"https://codeload.github.com/hadiidbouk/ChartProgressBar-iOS/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadiidbouk%2FChartProgressBar-iOS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278259829,"owners_count":25957547,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["chart","progressbar","swift-3"],"created_at":"2024-09-24T20:35:18.387Z","updated_at":"2025-10-04T03:31:46.917Z","avatar_url":"https://github.com/hadiidbouk.png","language":"Swift","readme":"# ChartProgressBar-iOS\n\n[![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://github.com/hadiidbouk/ChartProgressBar-iOS/blob/master/LICENSE)\n\nDraw a chart with progress bar style - the android version [here](https://github.com/hadiidbouk/ChartProgressBar-Android)\n\n![](https://i.imgur.com/bMB49fa.png)\n\n## Installation\n\niOS version (9.0,*)\n\nSwift 3.2\n\nUsing cocoapods : ```pod 'ChartProgressBar' ```\n\n![](https://cocoapod-badges.herokuapp.com/v/ChartProgressBar/$VERSION/badge.png)\n\nOr \n\nClone this repo and copy all the files\n\n## Usage\n\nAdd a UIView and set class name 'ChartProgressBar' ,\nset the width and the height of this UIView\n\n![](https://i.imgur.com/l3utMxR.png)\n\n2. Add your Data to the chart :\n\n```swift\n\nimport UIKit\nimport ChartProgressBar\n\nclass ViewController: UIViewController, ChartProgressBarDelegate {\n\n@IBOutlet weak var chart: ChartProgressBar!\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n        // Do any additional setup after loading the view, typically from a nib.\n\n        var data: [BarData] = []\n\n        data.append(BarData.init(barTitle: \"Jan\", barValue: 1.4, pinText: \"1.4 €\"))\n        data.append(BarData.init(barTitle: \"Feb\", barValue: 10, pinText: \"10 €\"))\n        data.append(BarData.init(barTitle: \"Mar\", barValue: 3.1, pinText: \"3.1 €\"))\n        data.append(BarData.init(barTitle: \"Apr\", barValue: 4.8, pinText: \"4.8 €\"))\n        data.append(BarData.init(barTitle: \"May\", barValue: 6.6, pinText: \"6.6 €\"))\n        data.append(BarData.init(barTitle: \"Jun\", barValue: 7.4, pinText: \"7.4 €\"))\n        data.append(BarData.init(barTitle: \"Jul\", barValue: 5.5, pinText: \"5.5 €\"))\n\n        chart.data = data\n        chart.barsCanBeClick = true\n        chart.maxValue = 10.0\n        chart.emptyColor = UIColor.clear\n        chart.barWidth = 7\n        chart.progressColor = UIColor.init(hexString: \"99ffffff\")\n        chart.progressClickColor = UIColor.init(hexString: \"F2912C\")\n        chart.pinBackgroundColor = UIColor.init(hexString: \"E2335E\")\n        chart.pinTxtColor = UIColor.init(hexString: \"ffffff\")\n        chart.barTitleColor = UIColor.init(hexString: \"B6BDD5\")\n        chart.barTitleSelectedColor = UIColor.init(hexString: \"FFFFFF\")\n        chart.pinMarginBottom = 15\n        chart.pinWidth = 70\n        chart.pinHeight = 29\n        chart.pinTxtSize = 17\n        chart.delegate = self\n        chart.build()\n\t\n        chart.disableBar(at: 3)\n\t\n\tlet when = DispatchTime.now() + 6 // change 2 to desired number of seconds\n        DispatchQueue.main.asyncAfter(deadline: when) {\n            self.chart.enableBar(at: 3)\n        }\n    }   \n  }\n```\n\n  To Handle ChartProgressBarDelegate\n  \n```\n  extension MainViewController: ChartProgressBarDelegate {\n    func ChartProgressBar(_ chartProgressBar: ChartProgressBar, didSelectRowAt rowIndex: Int) {\n        print(rowIndex)\n    }\n}\n```\n\n## Useful methods\n\n1. `chart.removeValues()` : Remove values of all progress bars in the chart.\n\n2. `chart.resetValues()` : Set values to the chart ( it may used after `removeBarValues()`) .\n\n3. `chart.removeClickedBar()` : Unselect the clicked bar.\n\n4. `isBarsEmpty()` : Check if bars values are empty.\n\n5. `chart.disableBar(at: Int)` : Disable a bar progmatically.\n\n6. `chart.enableBar(at: Int)` : Enable a bar progmatically.\n\n7. `clickBar(index: Int)` : Click a bar progmatically.\n\n## Credits\n\nthis library use [AlNistor](https://github.com/AlNistor/vertical-progress-bar-swift) sample to draw a single bar.\n\nThanks for [Simplexity](http://simplexity.io) that gave me time for doing this library.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhadiidbouk%2Fchartprogressbar-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhadiidbouk%2Fchartprogressbar-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhadiidbouk%2Fchartprogressbar-ios/lists"}