There is a method called setDrawValues ββthat allows you to enable or disable label text. Here is an example in Swift with LineChart:
xValues = ["1","2"] yValues = [54.0, 42.0] var dataEntries: [ChartDataEntry] = [] for i in 0..<xValues.count { let dataEntry = ChartDataEntry(value: yvalues[i], xIndex: i) dataEntries.append(dataEntry) } let lineChartDataSet = LineChartDataSet(yVals: dataEntries, label: "YourData") let lineChartData = LineChartData(xVals: xValues, dataSet: lineChartDataSet)
Edit: In this case, you can also use this method for your BarChartData object.
The documentation can be found here (ios diagrams are based on MPAndroidChart and therefore have more or less the same functionality): https://jitpack.io/com/github/PhilJay/MPAndroidChart/v2.2.3/javadoc/com/github/mikephil/ charting / data / ChartData.html # setDrawValues ββ(boolean)
source share