     
     private var barPath = UIBezierPath()
     private var barWidth: CGFloat = 4
-    
-    init(frame: CGRect, barWidth: CGFloat, barColor: UIColor, barLineWidth: CGFloat, barLineColor: UIColor) {
+    private var shouldRoundCorners = false
+    
+    init(frame: CGRect, barWidth: CGFloat, barColor: UIColor, barLineWidth: CGFloat, barLineColor: UIColor, shouldRoundCorners: Bool) {
         super.init(viewportWidth: frame.size.width, viewportHeight: frame.size.height)
         
         self.barWidth = barWidth
         self.lineWidth = barLineWidth
         self.strokeColor = barLineColor.cgColor
         self.fillColor = barColor.cgColor
+        self.shouldRoundCorners = shouldRoundCorners
         
         self.lineJoin = lineJoin
         self.lineCap = lineCap

    
    private func createBarPath(centre: CGPoint) -> UIBezierPath {
        
        let squarePath = UIBezierPath()
        
        squarePath.move(to: centre)
        let barWidthOffset: CGFloat = self.barWidth / 2
        
        let topLeft = CGPoint(x: centre.x - barWidthOffset, y: centre.y)
        let topRight = CGPoint(x: centre.x + barWidthOffset, y: centre.y)
        let bottomLeft = CGPoint(x: centre.x - barWidthOffset, y: zeroYPosition)
        let bottomRight = CGPoint(x: centre.x + barWidthOffset, y: zeroYPosition)
        
        squarePath.move(to: topLeft)
        squarePath.addLine(to: topRight)
        squarePath.addLine(to: bottomRight)
        squarePath.addLine(to: bottomLeft)
        squarePath.addLine(to: topLeft)
        
        return squarePath
    }
    
    private func createPath () -> UIBezierPath {

            // Need to update the graph points so they are in their right positions for the new viewport.
            // Animate them into position if animation is enabled, but make sure to stop any current animations first.
            #if !TARGET_INTERFACE_BUILDER
                dequeueAllAnimations()
            #endif
            startAnimations()
            
