diff --git a/Classes/Drawing/ReferenceLineDrawingView.swift b/Classes/Drawing/ReferenceLineDrawingView.swift index 965f399..bb2af07 100644 --- a/Classes/Drawing/ReferenceLineDrawingView.swift +++ b/Classes/Drawing/ReferenceLineDrawingView.swift @@ -106,7 +106,10 @@ internal class ReferenceLineDrawingView : UIView { numberFormatter.numberStyle = self.settings.referenceLineNumberStyle numberFormatter.minimumFractionDigits = self.settings.referenceLineNumberOfDecimalPlaces numberFormatter.maximumFractionDigits = self.settings.referenceLineNumberOfDecimalPlaces - + if let currencyCode = self.settings.currencyCode, let currencySymbol = self.settings.currencySymbol{ + numberFormatter.currencyCode = currencyCode + numberFormatter.currencySymbol = currencySymbol + } return numberFormatter } diff --git a/Classes/Reference/ReferenceLines.swift b/Classes/Reference/ReferenceLines.swift index 38f12aa..6847b37 100644 --- a/Classes/Reference/ReferenceLines.swift +++ b/Classes/Reference/ReferenceLines.swift @@ -51,7 +51,10 @@ open class ReferenceLines { @IBInspectable open var referenceLineNumberOfDecimalPlaces: Int = 0 /// The NSNumberFormatterStyle that reference lines should use to display @IBInspectable open var referenceLineNumberStyle: NumberFormatter.Style = .none - + /// The default currency of the referenceLineNumberStyle + @IBInspectable open var currencyCode: String? + /// The default currency symbol of the referenceLineNumberStyle + @IBInspectable open var currencySymbol: String? // Data Point Labels // TODO: Refactor these into their own settings and allow for more label options (positioning) // ################################################################################################################