https://github.com/danielgindi/Charts/issues/186
1 2 3 4 5 |
chartDataSet.drawFilledEnabled = true let gradientColors = [UIColor.red.cgColor,UIColor.init(white: 1, alpha: 0).cgColor] let colorLocations:[CGFloat] = [1.0,0.0] let gradient = CGGradient.init(colorsSpace: CGColorSpaceCreateDeviceRGB(), colors: gradientColors as CFArray, locations: colorLocations) chartDataSet.fill = LinearGradientFill(gradient: gradient!,angle: 90) |
