<commit_before>//
//  ChartYAxis.swift
//  Charts
//
//  Created by <NAME> on 23/2/15.

//
//  Copyright 2015 <NAME> & <NAME>
//  A port of MPAndroidChart for iOS
//  Licensed under Apache License 2.0
//
//  https://github.com/danielgindi/ios-charts
//

import Foundation
import CoreGraphics

#if !os(OSX)
    import UIKit
#endif


/// Class representing the y-axis labels settings and its entries.
/// Be aware that not all features the YLabels class provides are suitable for the RadarChart.
/// Customizations that affect the value range of the axis need to be applied before setting data for the chart.
public class ChartYAxis: ChartAxisBase
{
    @objc
    public enum YAxisLabelPosition: Int
    {
        case OutsideChart
        case InsideChart
    }
    
    ///  Enum that specifies the axis a DataSet should be plotted against, either Left or Right.
    @objc
    public enum AxisDependency: Int
    {
        case Left
        case Right
    }
    
    public var entries = [Double]()
    public var entryCount: Int { return entries.count; }
    
    /// the number of y-label entries the y-labels should have, default 6
    private var _labelCount = Int(6)
    
    /// indicates if the top y-label entry is drawn or not
    public var drawTopYLabelEntryEnabled = true
    
    /// if true, the y-labels show only the minimum and maximum value
    public var showOnlyMinMaxEnabled = false
    
    /// flag that indicates if the axis is inverted or not
    public var inverted = false
    
    /// This property is deprecated - Use `customAxisMin` instead.
    public var startAtZeroEnabled: Bool
    {
        get
        {
            return customAxisMin == 0.0
        }
        set
        {
            if newValue
            {
                customAxisMin = 0.0
            }
            else
            {
                resetCustomAxisMin()
            }
        }
    }
    
    /// if true, the set number of y-labels will be forced
    public var forceLabelsEnabled = false

    /// flag that indicates if the zero-line should be drawn regardless of other grid lines
    public var drawZeroLineEnabled = true
    
    /// Color of the zero line
    public var zeroLineColor: NSUIColor? = NSUIColor.grayColor()
    
    /// Width of the zero line
    public var zeroLineWidth: CGFloat = 1.0
    
    /// This is how much (in pixels) into the dash pattern are we starting from.
    public var zeroLineDashPhase = CGFloat(0.0)
    
    /// This is the actual dash pattern.
    /// I.e. [2, 3] will paint [--   --   ]
    /// [1, 3, 4, 2] will paint [-   ----  -   ----  ]
    public var zeroLineDashLengths: [CGFloat]?
    <commit_msg>Initialize `drawZeroLineEnabled` to `false`, for backwards compatibility (Fixes #849)<commit_after>//
//  ChartYAxis.swift
//  Charts
//
//  Created by <NAME> on 23/2/15.

//
//  Copyright 2015 <NAME> & <NAME>
//  A port of MPAndroidChart for iOS
//  Licensed under Apache License 2.0
//
//  https://github.com/danielgindi/ios-charts
//

import Foundation
import CoreGraphics

#if !os(OSX)
    import UIKit
#endif


/// Class representing the y-axis labels settings and its entries.
/// Be aware that not all features the YLabels class provides are suitable for the RadarChart.
/// Customizations that affect the value range of the axis need to be applied before setting data for the chart.
public class ChartYAxis: ChartAxisBase
{
    @objc
    public enum YAxisLabelPosition: Int
    {
        case OutsideChart
        case InsideChart
    }
    
    ///  Enum that specifies the axis a DataSet should be plotted against, either Left or Right.
    @objc
    public enum AxisDependency: Int
    {
        case Left
        case Right
    }
    
    public var entries = [Double]()
    public var entryCount: Int { return entries.count; }
    
    /// the number of y-label entries the y-labels should have, default 6
    private var _labelCount = Int(6)
    
    /// indicates if the top y-label entry is drawn or not
    public var drawTopYLabelEntryEnabled = true
    
    /// if true, the y-labels show only the minimum and maximum value
    public var showOnlyMinMaxEnabled = false
    
    /// flag that indicates if the axis is inverted or not
    public var inverted = false
    
    /// This property is deprecated - Use `customAxisMin` instead.
    public var startAtZeroEnabled: Bool
    {
        get
        {
            return customAxisMin == 0.0
        }
        set
        {
            if newValue
            {
                customAxisMin = 0.0
            }
            else
            {
                resetCustomAxisMin()
            }
        }
    }
    
    /// if true, the set number of y-labels will be forced
    public var forceLabelsEnabled = false

    /// flag that indicates if the zero-line should be drawn regardless of other grid lines
    public var drawZeroLineEnabled = false
    
    /// Color of the zero line
    public var zeroLineColor: NSUIColor? = NSUIColor.grayColor()
    
    /// Width of the zero line
    public var zeroLineWidth: CGFloat = 1.0
    
    /// This is how much (in pixels) into the dash pattern are we starting from.
    public var zeroLineDashPhase = CGFloat(0.0)
    
    /// This is the actual dash pattern.
    /// I.e. [2, 3] will paint [--   --   ]
    /// [1, 3, 4, 2] will paint [-   ----  -   ----  ]
    public var zeroLineDashLengths: [CGFloat]?
    
{'fraction_non_alphanumeric': 0.08152677413377803, 'fraction_numerical': 0.010561423012784881, 'mean_word_length': 1.9194159004867497, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7475266', 'n_tokens_mistral': 1562, 'n_tokens_neox': 1502, 'n_words': 596}