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
This worked for me:
Swift 5
let valFormatter = NumberFormatter() valFormatter.numberStyle = .currency valFormatter.maximumFractionDigits = 2 valFormatter.currencySymbol = "$" lineChartPrice.leftAxis.valueFormatter = DefaultAxisValueFormatter(formatter: valFormatter)