Hi,
Does this support two or more gradient color for bars?
Thanks.
What you mean for the gradient color for bars? It has fill color first; and you can customize the color for each dataSet
I have a requirement to create a graph like this:

hmm, it seems you need to implement the gradient layer by yourself. ios-charts does not support this right now.
But for the line chart, we already support the filling - check out drawLinearFill and enable it with dataSet.isDrawFilledEnabled
Feel free to reopen it if you have more questions
Do you have any example code for the gradient fill on the line chart? I cannot seem to reproduce it in Swift. Thank you so much!
Any update on this? Still no gradient layer for Barcharts?
not yet. Busy with Chart 3.0
hi
I would like to know how to make Line Chart(gradient fill)
@Egor1219
Hi, you can do this with for example like this :
let chartDataSet = LineChartDataSet(values: %%YOUR DATA ENTRIES %%, label: "Temperature")
// Gradient
let gradientColors = [UIColor.red.cgColor, UIColor.clear.cgColor] as CFArray // Colors of the gradient
let colorLocations:[CGFloat] = [0.5, 0.0] // Positioning of the gradient
let gradient = CGGradient.init(colorsSpace: CGColorSpaceCreateDeviceRGB(), colors: gradientColors, locations: colorLocations) // Gradient Object
chartDataSet.fill = Fill.fillWithLinearGradient(gradient!, angle: 90.0) // Set the Gradient
chartDataSet.drawFilledEnabled = true // Draw the Gradient
chartDataSet.drawCubicEnabled = true
chartDataSet.cubicIntensity = 0.09
Swift 3
I have created a video tutorial for this task. Kindly refer to my video.
@vigyanhoon
Hi! Have you found the solution for BarChartView gradientColors?and coding by Objective-C
Its pretty old issue. I have now moved to front end dev.