1

I'm using Daniel Gindi's Charts library implementing a bar chart on iOS. My chart has several data sets. I'm able to set a specific color for every value of a bar.

let dataSet = BarChartDataSet(entries: entries, label: nil)
dataSet.colors = [firstValueColor(), secondValueColor()]

But additionally I would like to group bars by a common background color for every data set. However it seems like BarChartDataSet doesn't have any property like fillColor or backgroundColor.

How can I set different background colors for different data sets instead of the single background color of the chart view? I'm looking for something like this:

dataSet.backgroundColor = .red
Dmytro Skorokhod
  • 424
  • 8
  • 17

0 Answers0