BarChartData(xVals: dataPoints, dataSet: chartDataSet)
found the way thanks
@Aungbandlab what is the way?
let labels = ["Label 1", "Label 2"]
chartView.xAxis.valueFormatter = DefaultAxisValueFormatter {
return labels[Int($0)]
}
@fnk0
// MARK: axisFormatDelegate
extension StackBarChartCell: IValueFormatter {
func stringForValue(_ value: Double,
entry: ChartDataEntry,
dataSetIndex: Int,
viewPortHandler: ViewPortHandler?) -> String {
return String(format: "%.0f", value)
}
}
Most helpful comment