I want to visualize a horizontal histogram (stacked) using ios diagrams that does not display either the x axis or the grid line. I turned off all the settings that I can find, but the bottom x axis is still displayed.
func setUpBarChart() { // General bar chart settings barChart.pinchZoomEnabled = false barChart.drawGridBackgroundEnabled = false barChart.drawBarShadowEnabled = false barChart.drawValueAboveBarEnabled = false barChart.drawBordersEnabled = false barChart.drawMarkers = false barChart.legend.enabled = false barChart.descriptionText = "" barChart.drawBordersEnabled = false // Left-axis settings barChart.leftAxis.drawLabelsEnabled = false barChart.leftAxis.drawTopYLabelEntryEnabled = false barChart.leftAxis.drawAxisLineEnabled = false // x-axis settings barChart.xAxis.drawAxisLineEnabled = false barChart.xAxis.drawGridLinesEnabled = false barChart.xAxis.drawLabelsEnabled = false barChart.xAxis.enabled = false // add some dummy data let entry = BarChartDataEntry(values: [10,2,5], xIndex: 0) let set = BarChartDataSet(yVals: [entry], label: nil) set.colors = [UIColor.greenColor(), UIColor.yellowColor(), UIColor.redColor()] set.drawValuesEnabled = false let data = BarChartData(xVals: [""], dataSet: set) barChart.data = data }
this code leads to the following rendering:

How to remove bottom axis output lines and vertical values?
source share