I\'ve created a BarChart using BarChartView
from ios-Charts but I can\'t figure out howto add rounded corners to bars.
This is the code that I\'m using:
In BarChartRenderer.swift
you can to modify open func drawDataSet(context: CGContext, dataSet: IBarChartDataSet, index: Int)
Then there's if-statement
for stacked and nonstacked bars, choose your case and remove:
context.fill(barRect)
and instead of it add:
let bezierPath = UIBezierPath(roundedRect: barRect, cornerRadius: %YOUR_CORNER_RADIUS%)
context.addPath(bezierPath.cgPath)
context.drawPath(using: .fill)