I am working with library to build a great charts in my app. Everything works good but today I encountered a problem. I want to add simply background color below chart`s legend.
My legend looks like this:
I want to achieve something like this:
My current implementation of chart`s legend part:
private func prepareLegend() {
lineChart.legend.drawInside = true
lineChart.legend.horizontalAlignment = .right
lineChart.legend.verticalAlignment = .top
lineChart.legend.orientation = .vertical
lineChart.legend.formSize = 14.0
lineChart.legend.yEntrySpace = 6.0
lineChart.legend.font = UIFont.pmd_robotoRegular(ofSize: 12.0)
lineChart.legend.textColor = UIColor.pmd_darkGrey
let upperLegend = LegendEntry()
upperLegend.label = "Upper Thershold"
upperLegend.form = .square
upperLegend.formColor = UIColor.pmd_red
let lowerLegend = LegendEntry()
lowerLegend.label = "Lower Thershold"
lowerLegend.form = .square
lowerLegend.formColor = UIColor.pmd_red
lineChart.legend.extraEntries = [upperLegend, lowerLegend]
}
Anybody here is familiar with this library and can help me?