I am trying to create a nice gradient fill as seen in the demos on the ios-charts page. However, I cannot figure this out in swift vs obj-c. Here is the obj-c code:
I believe this is the code that you are looking for. You should be able to use the same ChartFill class in Swift to set set1.fill.
let gradColors = [UIColor.cyanColor().CGColor, UIColor.clearColor.CGColor]
let colorLocations:[CGFloat] = [0.0, 1.0]
if let gradient = CGGradientCreateWithColors(CGColorSpaceCreateDeviceRGB(), gradColors, colorLocations) {
set1.fill = ChartFill(linearGradient: gradient, angle: 90.0)
}