I'm using iOS Charts by Daniel Gindi on Github. I'm presenting a chart with a Limit Line and all is well. When I add data to the chart, everything is working fine, yet the Limit Line appears twice. I've tried reinitializing the Limit Line:
var limitLine = ChartLimitLine()
limitLine = ChartLimitLine(limit:
self.averagePointsArray.average, label: "This weeks average")
self.barChartView.rightAxis.addLimitLine(limitLine)
self.setChart()
I've also tried to use the methods:
barChartView.clear() barChartView.clearValues()
Again, the data is chart is working fine. Strange.