Last active
November 15, 2016 06:45
-
-
Save mbalex99/0d459086ced600520f4b5ca8a1af6478 to your computer and use it in GitHub Desktop.
Swift PieChartData
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let entry1 = PieChartDataEntry(value: 0.75, label: "Something1") | |
let entry2 = PieChartDataEntry(value: 0.25, label: "Something2") | |
let dataSet = PieChartDataSet(values: [entry1, entry2], label: nil) | |
dataSet.colors = [UIColor.red, UIColor.blue] // in order of the entries by index | |
pieChartView.data = PieChartData(dataSet: dataSet) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment