有谁知道如何获得自定义颜色以在 iOS 图表中使用 labelTextColor ?当我尝试插入自定义颜色时,标签就会消失。例如:
这有效:
self.chartView.leftAxis.labelTextColor = UIColor.cyanColor()
Run Code Online (Sandbox Code Playgroud)
但这样的事情不会:
self.chartView.rightAxis.labelTextColor = UIColor(red: 150, green: 202, blue: 56, alpha: 1)
Run Code Online (Sandbox Code Playgroud)