                 newRangeTo = self.rangeTo - interval
                 newRangeFrom = self.rangeFrom + interval
                 newRange = self.rangeTo - self.rangeFrom
-                if newRange >= kMinRange {
+                if newRange >= scaleRangeMin {
                     
                     if self.plotCount > self.rangeTo - self.rangeFrom {
                         if newRangeFrom < self.rangeTo {

open class CHKLineChartView: UIView {
    
    /// MARK: - 常量
    let kMinRange = 13       //最小缩放范围
    let kMaxRange = 133     //最大缩放范围
    let kPerInterval = 4    //缩放的每段间隔
    open let kYAxisLabelWidth: CGFloat = 46        //默认宽度
    open let kXAxisHegiht: CGFloat = 16        //默认X坐标的高度
    
    /// MARK: - 成员变量
    @IBInspectable open var upColor: UIColor = UIColor.green     //升的颜色
    @IBInspectable open var downColor: UIColor = UIColor.red     //跌的颜色

                newRangeTo = self.rangeTo + interval
                newRangeFrom = self.rangeFrom - interval
                newRange = self.rangeTo - self.rangeFrom
                if newRange <= scaleRangeMax {
                    
                    if newRangeFrom >= 0 {
                        self.rangeFrom = newRangeFrom
