 import Foundation
 
 @objc(AXAxisRenderer)
-open class XAxisRenderer: AxisRendererBase
-{
-    public init(viewPortHandler: PortHandler?, xAxis: XAxis?, transformer: Transformer?)
-    {
+open class XAxisRenderer: AxisRendererBase {
+    
+    public init(viewPortHandler: PortHandler?, xAxis: XAxis?, transformer: Transformer?) {
         super.init(viewPortHandler: viewPortHandler, transformer: transformer, axis: xAxis)
     }
     
-    open override func computeAxis(min: Double, max: Double, inverted: Bool)
-    {
+    open override func computeAxis(min: Double, max: Double, inverted: Bool) {
         guard let
             viewPortHandler = self.viewPortHandler
             else { return }
         
         var min = min, max = max
         
-        if let transformer = self.transformer
-        {
+        if let transformer = self.transformer {
             // calculate the starting and entry point of the y-labels (depending on
             // zoom / contentrect bounds)
-            if viewPortHandler.contentWidth > 10 && !viewPortHandler.isFullyZoomedOutX
-            {
+            if viewPortHandler.contentWidth > 10 && !viewPortHandler.isFullyZoomedOutX {
                 let p1 = transformer.valueForTouchPoint(CGPoint(x: viewPortHandler.contentLeft, y: viewPortHandler.contentTop))
                 let p2 = transformer.valueForTouchPoint(CGPoint(x: viewPortHandler.contentRight, y: viewPortHandler.contentTop))
                 
-                if inverted
-                {
+                if inverted {
                     min = Double(p2.x)
                     max = Double(p1.x)
-                }
-                else
-                {
+                } else {
                     min = Double(p1.x)
                     max = Double(p2.x)
                 }

        return contentRect
    }
    
    open func drawGridLine(context: CGContext, x: CGFloat, y: CGFloat)
    {
        guard
            let viewPortHandler = self.viewPortHandler
            else { return }
        
        if x >= viewPortHandler.offsetLeft
            && x <= viewPortHandler.chartWidth
        {
            context.beginPath()
            context.move(to: CGPoint(x: x, y: viewPortHandler.contentTop))
            context.addLine(to: CGPoint(x: x, y: viewPortHandler.contentBottom))

        let label = limitLine.label
        
        // if drawing the limit-value label is enabled
        if limitLine.drawLabelEnabled && label.characters.count > 0 {
            let labelLineHeight = limitLine.valueFont.lineHeight
            
            let xOffset: CGFloat = limitLine.lineWidth + limitLine.xOffset
            
            if limitLine.labelPosition == .rightTop {
                AUtils.drawText(context: context,
                                    text: label,
                                    point: CGPoint(
