Reputation: 137
Does anyone know how to get a custom color to work with labelTextColor in iOS Charts? When I try to plug in a custom color the labels just disappear. For example:
This works:
self.chartView.leftAxis.labelTextColor = UIColor.cyanColor()
But something like this does not:
self.chartView.rightAxis.labelTextColor = UIColor(red: 150, green: 202, blue: 56, alpha: 1)
Upvotes: 1
Views: 150
Reputation: 12303
replace
self.chartView.rightAxis.labelTextColor = UIColor(red: 150, green: 202, blue: 56, alpha: 1)
with
self.chartView.rightAxis.labelTextColor = UIColor(red: 150.0/255, green: 202.0/255, blue: 56.0/255, alpha: 1)
Upvotes: 5