     private func calculateYPositionForYAxisValue(value: Double) -> CGFloat {
         
         // Just an algebraic re-arrangement of calculateYAxisValue
-        
         let graphHeight = self.frame.size.height - (topMargin + bottomMargin)
         var y = ((CGFloat(value - self.currentRange.max) / CGFloat(self.currentRange.min - self.currentRange.max)) * graphHeight) + topMargin
         

    
    private var lineWidth: CGFloat {
        get {
            if(self.settings.referenceLineType == ScrollableGraphViewReferenceLineType.cover) {
                return self.bounds.width
            }
            else {
                return referenceLineWidth
            }
        }
    }
    

            // as we calculate the position for the y axis value in the previous line,
            // this already takes into account margins, etc.
            let lineStart = CGPoint(x: 0, y: yPosition)
            let lineEnd = CGPoint(x: lineStart.x + lineWidth, y: lineStart.y)
            
            createReferenceLineFrom(from: lineStart, to: lineEnd, in: path)
        }
