Skip to content

Extensions for simplifying the work with Charts

License

Notifications You must be signed in to change notification settings

AlexSmet/Extensions-For-Charts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Extension for Charts

Platform Language License

The class extension for simplifying the work with danielgindi/Charts

Usage

If you use Charts and already have BarChartView in your project, just add file with extension (BarChartViewExtention.swift) in the project and use function setBarChartData for set values for X and Y axis.

    @IBOutlet weak var barChartView: BarChartView!

    ...

    func setChart(){
        let months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
        let unitsSold = [20.0, 4.0, 3.0, 6.0, 12.0, 16.0, 4.0, 18.0, 2.0, 4.0, 5.0, 4.0]
        
        barChartView.setBarChartData(xValues: months, yValues: unitsSold, label: "Monthly Sales")
    }    

Author

Created by Alexander Smetannikov (alexsmetdev@gmail.com)

About

Extensions for simplifying the work with Charts

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages