Search code examples
swiftios-charts

How do I complete remove the draw value on bar chart using iOS charts with swift 3


I am trying to remove the bottom draw values (in black) on my X axis. I tried self.chartActual.drawValueAboveBarEnabled = false but all that does is move the values to below the top of the bar. I also tried self.chartActual.xAxis.drawLabelsEnabled = false but that hides my top labels.

How do I remove the drawvalue on the X axis using ios-charts?


Solution

  •     let datamore = BarChartData()
        let ds12 = BarChartDataSet(values: dataEntries, label: nil)
        datamore.addDataSet(ds12)
    
        datamore.setDrawValues(false)
    

    I needed the last line AFTER adding the data.