I am using iOS charts plugin (line chart) and wish to style the chart values (the number above each point) to a decimal number.
The value is a double, but charts by defa
let data = PieChartData(dataSet: set) let formatter = NumberFormatter() formatter.numberStyle = .percent formatter.maximumFractionDigits = 2 formatter.multiplier = 1.0 formatter.percentSymbol = "%" formatter.zeroSymbol = "" data.setValueFormatter(DefaultValueFormatter(formatter: formatter))