All Projects → hadiidbouk → ChartProgressBar-iOS

hadiidbouk / ChartProgressBar-iOS

Licence: MIT license
Draw a chart with progress bar style

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to ChartProgressBar-iOS

Linearprogressbar
Simple progress bar for iOS
Stars: ✭ 166 (+97.62%)
Mutual labels:  progressbar
React Sweet Progress
A way to quickly add a progress bar to react app 🌈
Stars: ✭ 239 (+184.52%)
Mutual labels:  progressbar
Write-ProgressEx
Write-ProgressEx is a powershell advanced function that extends the Write-Progress cmdlet.
Stars: ✭ 28 (-66.67%)
Mutual labels:  progressbar
Alive Progress
A new kind of Progress Bar, with real-time throughput, ETA, and very cool animations!
Stars: ✭ 2,940 (+3400%)
Mutual labels:  progressbar
Chartprogressbar Android
Draw a chart with progress bar style
Stars: ✭ 213 (+153.57%)
Mutual labels:  progressbar
MatlabProgressBar
This MATLAB class provides a smart progress bar like tqdm in the command window and is optimized for progress information in simple iterations or large frameworks with full support of parallel parfor loops provided by the MATLAB Parallel Computing Toolbox.
Stars: ✭ 44 (-47.62%)
Mutual labels:  progressbar
Progress Bar.sh
Simple & sexy progress bar for `bash`, give it a duration and it will do the rest.
Stars: ✭ 155 (+84.52%)
Mutual labels:  progressbar
TCProgressBar
Simple and clean progress bar
Stars: ✭ 34 (-59.52%)
Mutual labels:  progressbar
Mkmagneticprogress
A circular progress bar for iOS written in Swift
Stars: ✭ 214 (+154.76%)
Mutual labels:  progressbar
ProgressBar
Beautiful progress bar for android
Stars: ✭ 62 (-26.19%)
Mutual labels:  progressbar
Downloader Cli
A simple downloader written in Python with an awesome customizable progressbar.
Stars: ✭ 186 (+121.43%)
Mutual labels:  progressbar
Progress dialog
A light weight library to easily manage a progress dialog with simple steps whenever you need to do it. You can easily show and hide it.
Stars: ✭ 196 (+133.33%)
Mutual labels:  progressbar
shell-progressbar
Make a progress bar GUI on terminal platform (Shell script)
Stars: ✭ 39 (-53.57%)
Mutual labels:  progressbar
React Nprogress
⌛️ A React primitive for building slim progress bars.
Stars: ✭ 173 (+105.95%)
Mutual labels:  progressbar
vue-progressbar-component
[CSS GPU Animation] Simple progressbar for vuejs
Stars: ✭ 13 (-84.52%)
Mutual labels:  progressbar
React Spinners Kit
A collection of loading spinners with React.js
Stars: ✭ 158 (+88.1%)
Mutual labels:  progressbar
Floatingmusicmenu
一款可用于音乐播放器的悬浮菜单按钮(A floating music menu)
Stars: ✭ 247 (+194.05%)
Mutual labels:  progressbar
ProgressText
A text progress bar with animation effect, highly customized.
Stars: ✭ 13 (-84.52%)
Mutual labels:  progressbar
goterminal
A cross-platform Go-library for updating progress in terminal.
Stars: ✭ 56 (-33.33%)
Mutual labels:  progressbar
Examples wxWidgets
Shows how to use wxWidgets controls only by programming code (c++17).
Stars: ✭ 116 (+38.1%)
Mutual labels:  progressbar

ChartProgressBar-iOS

MIT Licence

Draw a chart with progress bar style - the android version here

Installation

iOS version (9.0,*)

Swift 3.2

Using cocoapods : pod 'ChartProgressBar'

Or

Clone this repo and copy all the files

Usage

Add a UIView and set class name 'ChartProgressBar' , set the width and the height of this UIView

  1. Add your Data to the chart :
import UIKit
import ChartProgressBar

class ViewController: UIViewController, ChartProgressBarDelegate {

@IBOutlet weak var chart: ChartProgressBar!

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.

        var data: [BarData] = []

        data.append(BarData.init(barTitle: "Jan", barValue: 1.4, pinText: "1.4 €"))
        data.append(BarData.init(barTitle: "Feb", barValue: 10, pinText: "10 €"))
        data.append(BarData.init(barTitle: "Mar", barValue: 3.1, pinText: "3.1 €"))
        data.append(BarData.init(barTitle: "Apr", barValue: 4.8, pinText: "4.8 €"))
        data.append(BarData.init(barTitle: "May", barValue: 6.6, pinText: "6.6 €"))
        data.append(BarData.init(barTitle: "Jun", barValue: 7.4, pinText: "7.4 €"))
        data.append(BarData.init(barTitle: "Jul", barValue: 5.5, pinText: "5.5 €"))

        chart.data = data
        chart.barsCanBeClick = true
        chart.maxValue = 10.0
        chart.emptyColor = UIColor.clear
        chart.barWidth = 7
        chart.progressColor = UIColor.init(hexString: "99ffffff")
        chart.progressClickColor = UIColor.init(hexString: "F2912C")
        chart.pinBackgroundColor = UIColor.init(hexString: "E2335E")
        chart.pinTxtColor = UIColor.init(hexString: "ffffff")
        chart.barTitleColor = UIColor.init(hexString: "B6BDD5")
        chart.barTitleSelectedColor = UIColor.init(hexString: "FFFFFF")
        chart.pinMarginBottom = 15
        chart.pinWidth = 70
        chart.pinHeight = 29
        chart.pinTxtSize = 17
        chart.delegate = self
        chart.build()
	
        chart.disableBar(at: 3)
	
	let when = DispatchTime.now() + 6 // change 2 to desired number of seconds
        DispatchQueue.main.asyncAfter(deadline: when) {
            self.chart.enableBar(at: 3)
        }
    }   
  }

To Handle ChartProgressBarDelegate

  extension MainViewController: ChartProgressBarDelegate {
    func ChartProgressBar(_ chartProgressBar: ChartProgressBar, didSelectRowAt rowIndex: Int) {
        print(rowIndex)
    }
}

Useful methods

  1. chart.removeValues() : Remove values of all progress bars in the chart.

  2. chart.resetValues() : Set values to the chart ( it may used after removeBarValues()) .

  3. chart.removeClickedBar() : Unselect the clicked bar.

  4. isBarsEmpty() : Check if bars values are empty.

  5. chart.disableBar(at: Int) : Disable a bar progmatically.

  6. chart.enableBar(at: Int) : Enable a bar progmatically.

  7. clickBar(index: Int) : Click a bar progmatically.

Credits

this library use AlNistor sample to draw a single bar.

Thanks for Simplexity that gave me time for doing this library.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].