SwiftPieChart
SwiftPieChart copied to clipboard
value formatter
Hi, thank you for your project. Its very nice. Iam trying to change many hours format value to locale "cs_CZ" with currency. Example number 123456.10 to 123 456,10 Kč. Iam sorry, Iam new one in SwiftUI. In swift just use:
` extension Double { var asLocaleCurrency: String { let formatter = NumberFormatter() formatter.numberStyle = .currency formatter.locale = Locale(identifier: "cs_CZ")
let formattedString = formatter.string(from: self as NSNumber)
return formattedString ?? ""
}
} let double = 123456.78 print(double.asLocaleCurrency) // 123 456,78 Kč ` but in SwiftUI with your formatter?? Please help!