diff --git a/Source/Charts/Animation/Animator.swift b/Source/Charts/Animation/Animator.swift index f5d8459095..042012b1ba 100644 --- a/Source/Charts/Animation/Animator.swift +++ b/Source/Charts/Animation/Animator.swift @@ -39,22 +39,22 @@ open class Animator: NSObject /// the phase that is animated and influences the drawn values on the y-axis @objc open var phaseY: Double = 1.0 - fileprivate var _startTimeX: TimeInterval = 0.0 - fileprivate var _startTimeY: TimeInterval = 0.0 - fileprivate var _displayLink: NSUIDisplayLink? + private var _startTimeX: TimeInterval = 0.0 + private var _startTimeY: TimeInterval = 0.0 + private var _displayLink: NSUIDisplayLink? - fileprivate var _durationX: TimeInterval = 0.0 - fileprivate var _durationY: TimeInterval = 0.0 + private var _durationX: TimeInterval = 0.0 + private var _durationY: TimeInterval = 0.0 - fileprivate var _endTimeX: TimeInterval = 0.0 - fileprivate var _endTimeY: TimeInterval = 0.0 - fileprivate var _endTime: TimeInterval = 0.0 + private var _endTimeX: TimeInterval = 0.0 + private var _endTimeY: TimeInterval = 0.0 + private var _endTime: TimeInterval = 0.0 - fileprivate var _enabledX: Bool = false - fileprivate var _enabledY: Bool = false + private var _enabledX: Bool = false + private var _enabledY: Bool = false - fileprivate var _easingX: ChartEasingFunctionBlock? - fileprivate var _easingY: ChartEasingFunctionBlock? + private var _easingX: ChartEasingFunctionBlock? + private var _easingY: ChartEasingFunctionBlock? public override init() { @@ -119,7 +119,7 @@ open class Animator: NSObject } } - @objc fileprivate func animationLoop() + @objc private func animationLoop() { let currentTime: TimeInterval = CACurrentMediaTime() diff --git a/Source/Charts/Charts/BarChartView.swift b/Source/Charts/Charts/BarChartView.swift index 685cac6150..16d7ed1674 100644 --- a/Source/Charts/Charts/BarChartView.swift +++ b/Source/Charts/Charts/BarChartView.swift @@ -16,10 +16,10 @@ import CoreGraphics open class BarChartView: BarLineChartViewBase, BarChartDataProvider { /// if set to true, all values are drawn above their bars, instead of below their top - fileprivate var _drawValueAboveBarEnabled = true + private var _drawValueAboveBarEnabled = true /// if set to true, a grey area is drawn behind each bar that indicates the maximum value - fileprivate var _drawBarShadowEnabled = false + private var _drawBarShadowEnabled = false internal override func initialize() { diff --git a/Source/Charts/Charts/BarLineChartViewBase.swift b/Source/Charts/Charts/BarLineChartViewBase.swift index 1ea179cf01..1461b9bc02 100644 --- a/Source/Charts/Charts/BarLineChartViewBase.swift +++ b/Source/Charts/Charts/BarLineChartViewBase.swift @@ -24,15 +24,15 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD internal var _maxVisibleCount = 100 /// flag that indicates if auto scaling on the y axis is enabled - fileprivate var _autoScaleMinMaxEnabled = false + private var _autoScaleMinMaxEnabled = false - fileprivate var _pinchZoomEnabled = false - fileprivate var _doubleTapToZoomEnabled = true - fileprivate var _dragXEnabled = true - fileprivate var _dragYEnabled = true + private var _pinchZoomEnabled = false + private var _doubleTapToZoomEnabled = true + private var _dragXEnabled = true + private var _dragYEnabled = true - fileprivate var _scaleXEnabled = true - fileprivate var _scaleYEnabled = true + private var _scaleXEnabled = true + private var _scaleYEnabled = true /// the color for the background of the chart-drawing area (everything behind the grid lines). @objc open var gridBackgroundColor = NSUIColor(red: 240/255.0, green: 240/255.0, blue: 240/255.0, alpha: 1.0) @@ -79,7 +79,7 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD internal var _panGestureRecognizer: NSUIPanGestureRecognizer! /// flag that indicates if a custom viewport offset has been set - fileprivate var _customViewPortEnabled = false + private var _customViewPortEnabled = false public override init(frame: CGRect) { @@ -272,8 +272,8 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD drawMarkers(context: context) } - fileprivate var _autoScaleLastLowestVisibleX: Double? - fileprivate var _autoScaleLastHighestVisibleX: Double? + private var _autoScaleLastLowestVisibleX: Double? + private var _autoScaleLastHighestVisibleX: Double? /// Performs auto scaling of the axis by recalculating the minimum and maximum y-values based on the entries currently in view. internal func autoScale() @@ -497,27 +497,27 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD // MARK: - Gestures - fileprivate enum GestureScaleAxis + private enum GestureScaleAxis { case both case x case y } - fileprivate var _isDragging = false - fileprivate var _isScaling = false - fileprivate var _gestureScaleAxis = GestureScaleAxis.both - fileprivate var _closestDataSetToTouch: IChartDataSet! - fileprivate var _panGestureReachedEdge: Bool = false - fileprivate weak var _outerScrollView: NSUIScrollView? + private var _isDragging = false + private var _isScaling = false + private var _gestureScaleAxis = GestureScaleAxis.both + private var _closestDataSetToTouch: IChartDataSet! + private var _panGestureReachedEdge: Bool = false + private weak var _outerScrollView: NSUIScrollView? - fileprivate var _lastPanPoint = CGPoint() /// This is to prevent using setTranslation which resets velocity + private var _lastPanPoint = CGPoint() /// This is to prevent using setTranslation which resets velocity - fileprivate var _decelerationLastTime: TimeInterval = 0.0 - fileprivate var _decelerationDisplayLink: NSUIDisplayLink! - fileprivate var _decelerationVelocity = CGPoint() + private var _decelerationLastTime: TimeInterval = 0.0 + private var _decelerationDisplayLink: NSUIDisplayLink! + private var _decelerationVelocity = CGPoint() - @objc fileprivate func tapGestureRecognized(_ recognizer: NSUITapGestureRecognizer) + @objc private func tapGestureRecognized(_ recognizer: NSUITapGestureRecognizer) { if _data === nil { @@ -543,7 +543,7 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD } } - @objc fileprivate func doubleTapGestureRecognized(_ recognizer: NSUITapGestureRecognizer) + @objc private func doubleTapGestureRecognized(_ recognizer: NSUITapGestureRecognizer) { if _data === nil { @@ -572,7 +572,7 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD } #if !os(tvOS) - @objc fileprivate func pinchGestureRecognized(_ recognizer: NSUIPinchGestureRecognizer) + @objc private func pinchGestureRecognized(_ recognizer: NSUIPinchGestureRecognizer) { if recognizer.state == NSUIGestureRecognizerState.began { @@ -662,7 +662,7 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD } #endif - @objc fileprivate func panGestureRecognized(_ recognizer: NSUIPanGestureRecognizer) + @objc private func panGestureRecognized(_ recognizer: NSUIPanGestureRecognizer) { if recognizer.state == NSUIGestureRecognizerState.began && recognizer.nsuiNumberOfTouches() > 0 { @@ -783,7 +783,7 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD } } - fileprivate func performPanChange(translation: CGPoint) -> Bool + private func performPanChange(translation: CGPoint) -> Bool { var translation = translation @@ -815,7 +815,7 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD return matrix.tx != originalMatrix.tx || matrix.ty != originalMatrix.ty } - fileprivate func isTouchInverted() -> Bool + private func isTouchInverted() -> Bool { return isAnyAxisInverted && _closestDataSetToTouch !== nil && @@ -831,7 +831,7 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD } } - @objc fileprivate func decelerationLoop() + @objc private func decelerationLoop() { let currentTime = CACurrentMediaTime() @@ -864,7 +864,7 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD } } - fileprivate func nsuiGestureRecognizerShouldBegin(_ gestureRecognizer: NSUIGestureRecognizer) -> Bool + private func nsuiGestureRecognizerShouldBegin(_ gestureRecognizer: NSUIGestureRecognizer) -> Bool { if gestureRecognizer == _panGestureRecognizer { diff --git a/Source/Charts/Charts/ChartViewBase.swift b/Source/Charts/Charts/ChartViewBase.swift index a88860ee00..41426689b6 100755 --- a/Source/Charts/Charts/ChartViewBase.swift +++ b/Source/Charts/Charts/ChartViewBase.swift @@ -54,14 +54,14 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate internal var _data: ChartData? /// Flag that indicates if highlighting per tap (touch) is enabled - fileprivate var _highlightPerTapEnabled = true + private var _highlightPerTapEnabled = true /// If set to true, chart continues to scroll after touch up @objc open var dragDecelerationEnabled = true /// Deceleration friction coefficient in [0 ; 1] interval, higher values indicate that speed will decrease slowly, for example if it set to 0, it will stop immediately. /// 1 is an invalid value, and will be converted to 0.999 automatically. - fileprivate var _dragDecelerationFrictionCoef: CGFloat = 0.9 + private var _dragDecelerationFrictionCoef: CGFloat = 0.9 /// if true, units are drawn next to the values in the chart internal var _drawUnitInChart = false @@ -154,7 +154,7 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate internal var _animator: Animator! /// flag that indicates if offsets calculation has already been done or not - fileprivate var _offsetsCalculated = false + private var _offsetsCalculated = false /// array of Highlight objects that reference the highlighted slices in the chart internal var _indicesToHighlight = [Highlight]() @@ -170,7 +170,7 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate /// The marker that is displayed when a value is clicked on the chart @objc open var marker: IMarker? - fileprivate var _interceptTouchEvents = false + private var _interceptTouchEvents = false /// An extra offset to be appended to the viewport's top @objc open var extraTopOffset: CGFloat = 0.0 diff --git a/Source/Charts/Charts/PieChartView.swift b/Source/Charts/Charts/PieChartView.swift index 7316c2fe03..d67ac92b99 100755 --- a/Source/Charts/Charts/PieChartView.swift +++ b/Source/Charts/Charts/PieChartView.swift @@ -20,57 +20,57 @@ import CoreGraphics open class PieChartView: PieRadarChartViewBase { /// rect object that represents the bounds of the piechart, needed for drawing the circle - fileprivate var _circleBox = CGRect() + private var _circleBox = CGRect() /// flag indicating if entry labels should be drawn or not - fileprivate var _drawEntryLabelsEnabled = true + private var _drawEntryLabelsEnabled = true /// array that holds the width of each pie-slice in degrees - fileprivate var _drawAngles = [CGFloat]() + private var _drawAngles = [CGFloat]() /// array that holds the absolute angle in degrees of each slice - fileprivate var _absoluteAngles = [CGFloat]() + private var _absoluteAngles = [CGFloat]() /// if true, the hole inside the chart will be drawn - fileprivate var _drawHoleEnabled = true + private var _drawHoleEnabled = true - fileprivate var _holeColor: NSUIColor? = NSUIColor.white + private var _holeColor: NSUIColor? = NSUIColor.white /// Sets the color the entry labels are drawn with. - fileprivate var _entryLabelColor: NSUIColor? = NSUIColor.white + private var _entryLabelColor: NSUIColor? = NSUIColor.white /// Sets the font the entry labels are drawn with. - fileprivate var _entryLabelFont: NSUIFont? = NSUIFont(name: "HelveticaNeue", size: 13.0) + private var _entryLabelFont: NSUIFont? = NSUIFont(name: "HelveticaNeue", size: 13.0) /// if true, the hole will see-through to the inner tips of the slices - fileprivate var _drawSlicesUnderHoleEnabled = false + private var _drawSlicesUnderHoleEnabled = false /// if true, the values inside the piechart are drawn as percent values - fileprivate var _usePercentValuesEnabled = false + private var _usePercentValuesEnabled = false /// variable for the text that is drawn in the center of the pie-chart - fileprivate var _centerAttributedText: NSAttributedString? + private var _centerAttributedText: NSAttributedString? /// the offset on the x- and y-axis the center text has in dp. - fileprivate var _centerTextOffset: CGPoint = CGPoint() + private var _centerTextOffset: CGPoint = CGPoint() /// indicates the size of the hole in the center of the piechart /// /// **default**: `0.5` - fileprivate var _holeRadiusPercent = CGFloat(0.5) + private var _holeRadiusPercent = CGFloat(0.5) - fileprivate var _transparentCircleColor: NSUIColor? = NSUIColor(white: 1.0, alpha: 105.0/255.0) + private var _transparentCircleColor: NSUIColor? = NSUIColor(white: 1.0, alpha: 105.0/255.0) /// the radius of the transparent circle next to the chart-hole in the center - fileprivate var _transparentCircleRadiusPercent = CGFloat(0.55) + private var _transparentCircleRadiusPercent = CGFloat(0.55) /// if enabled, centertext is drawn - fileprivate var _drawCenterTextEnabled = true + private var _drawCenterTextEnabled = true - fileprivate var _centerTextRadiusPercent: CGFloat = 1.0 + private var _centerTextRadiusPercent: CGFloat = 1.0 /// maximum angle for this pie - fileprivate var _maxAngle: CGFloat = 360.0 + private var _maxAngle: CGFloat = 360.0 public override init(frame: CGRect) { @@ -182,7 +182,7 @@ open class PieChartView: PieRadarChartViewBase } /// calculates the needed angles for the chart slices - fileprivate func calcAngles() + private func calcAngles() { _drawAngles = [CGFloat]() _absoluteAngles = [CGFloat]() @@ -247,13 +247,13 @@ open class PieChartView: PieRadarChartViewBase } /// calculates the needed angle for a given value - fileprivate func calcAngle(_ value: Double) -> CGFloat + private func calcAngle(_ value: Double) -> CGFloat { return calcAngle(value: value, yValueSum: (_data as! PieChartData).yValueSum) } /// calculates the needed angle for a given value - fileprivate func calcAngle(value: Double, yValueSum: Double) -> CGFloat + private func calcAngle(value: Double, yValueSum: Double) -> CGFloat { return CGFloat(value) / CGFloat(yValueSum) * _maxAngle } diff --git a/Source/Charts/Charts/PieRadarChartViewBase.swift b/Source/Charts/Charts/PieRadarChartViewBase.swift index 58b95c7e17..2480556e58 100755 --- a/Source/Charts/Charts/PieRadarChartViewBase.swift +++ b/Source/Charts/Charts/PieRadarChartViewBase.swift @@ -20,10 +20,10 @@ import CoreGraphics open class PieRadarChartViewBase: ChartViewBase { /// holds the normalized version of the current rotation angle of the chart - fileprivate var _rotationAngle = CGFloat(270.0) + private var _rotationAngle = CGFloat(270.0) /// holds the raw version of the current rotation angle of the chart - fileprivate var _rawRotationAngle = CGFloat(270.0) + private var _rawRotationAngle = CGFloat(270.0) /// flag that indicates if rotation is enabled or not @objc open var rotationEnabled = true @@ -32,11 +32,11 @@ open class PieRadarChartViewBase: ChartViewBase @objc open var minOffset = CGFloat(0.0) /// iOS && OSX only: Enabled multi-touch rotation using two fingers. - fileprivate var _rotationWithTwoFingers = false + private var _rotationWithTwoFingers = false - fileprivate var _tapGestureRecognizer: NSUITapGestureRecognizer! + private var _tapGestureRecognizer: NSUITapGestureRecognizer! #if !os(tvOS) - fileprivate var _rotationGestureRecognizer: NSUIRotationGestureRecognizer! + private var _rotationGestureRecognizer: NSUIRotationGestureRecognizer! #endif public override init(frame: CGRect) @@ -426,7 +426,7 @@ open class PieRadarChartViewBase: ChartViewBase // MARK: - Animation - fileprivate var _spinAnimator: Animator! + private var _spinAnimator: Animator! /// Applys a spin animation to the Chart. @objc open func spin(duration: TimeInterval, fromAngle: CGFloat, toAngle: CGFloat, easing: ChartEasingFunctionBlock?) @@ -465,21 +465,21 @@ open class PieRadarChartViewBase: ChartViewBase // MARK: - Gestures - fileprivate var _rotationGestureStartPoint: CGPoint! - fileprivate var _isRotating = false - fileprivate var _startAngle = CGFloat(0.0) + private var _rotationGestureStartPoint: CGPoint! + private var _isRotating = false + private var _startAngle = CGFloat(0.0) - fileprivate struct AngularVelocitySample + private struct AngularVelocitySample { var time: TimeInterval var angle: CGFloat } - fileprivate var _velocitySamples = [AngularVelocitySample]() + private var _velocitySamples = [AngularVelocitySample]() - fileprivate var _decelerationLastTime: TimeInterval = 0.0 - fileprivate var _decelerationDisplayLink: NSUIDisplayLink! - fileprivate var _decelerationAngularVelocity: CGFloat = 0.0 + private var _decelerationLastTime: TimeInterval = 0.0 + private var _decelerationDisplayLink: NSUIDisplayLink! + private var _decelerationAngularVelocity: CGFloat = 0.0 internal final func processRotationGestureBegan(location: CGPoint) { @@ -661,12 +661,12 @@ open class PieRadarChartViewBase: ChartViewBase } #endif - fileprivate func resetVelocity() + private func resetVelocity() { _velocitySamples.removeAll(keepingCapacity: false) } - fileprivate func sampleVelocity(touchLocation: CGPoint) + private func sampleVelocity(touchLocation: CGPoint) { let currentTime = CACurrentMediaTime() @@ -691,7 +691,7 @@ open class PieRadarChartViewBase: ChartViewBase } } - fileprivate func calculateVelocity() -> CGFloat + private func calculateVelocity() -> CGFloat { if _velocitySamples.isEmpty { @@ -750,7 +750,7 @@ open class PieRadarChartViewBase: ChartViewBase } /// sets the starting angle of the rotation, this is only used by the touch listener, x and y is the touch position - fileprivate func setGestureStartAngle(x: CGFloat, y: CGFloat) + private func setGestureStartAngle(x: CGFloat, y: CGFloat) { _startAngle = angleForPoint(x: x, y: y) @@ -759,7 +759,7 @@ open class PieRadarChartViewBase: ChartViewBase } /// updates the view rotation depending on the given touch position, also takes the starting angle into consideration - fileprivate func updateGestureRotation(x: CGFloat, y: CGFloat) + private func updateGestureRotation(x: CGFloat, y: CGFloat) { self.rotationAngle = angleForPoint(x: x, y: y) - _startAngle } @@ -773,7 +773,7 @@ open class PieRadarChartViewBase: ChartViewBase } } - @objc fileprivate func decelerationLoop() + @objc private func decelerationLoop() { let currentTime = CACurrentMediaTime() @@ -792,7 +792,7 @@ open class PieRadarChartViewBase: ChartViewBase } /// - returns: The distance between two points - fileprivate func distance(eventX: CGFloat, startX: CGFloat, eventY: CGFloat, startY: CGFloat) -> CGFloat + private func distance(eventX: CGFloat, startX: CGFloat, eventY: CGFloat, startY: CGFloat) -> CGFloat { let dx = eventX - startX let dy = eventY - startY @@ -800,7 +800,7 @@ open class PieRadarChartViewBase: ChartViewBase } /// - returns: The distance between two points - fileprivate func distance(from: CGPoint, to: CGPoint) -> CGFloat + private func distance(from: CGPoint, to: CGPoint) -> CGFloat { let dx = from.x - to.x let dy = from.y - to.y @@ -808,9 +808,9 @@ open class PieRadarChartViewBase: ChartViewBase } /// reference to the last highlighted object - fileprivate var _lastHighlight: Highlight! + private var _lastHighlight: Highlight! - @objc fileprivate func tapGestureRecognized(_ recognizer: NSUITapGestureRecognizer) + @objc private func tapGestureRecognized(_ recognizer: NSUITapGestureRecognizer) { if recognizer.state == NSUIGestureRecognizerState.ended { @@ -824,7 +824,7 @@ open class PieRadarChartViewBase: ChartViewBase } #if !os(tvOS) - @objc fileprivate func rotationGestureRecognized(_ recognizer: NSUIRotationGestureRecognizer) + @objc private func rotationGestureRecognized(_ recognizer: NSUIRotationGestureRecognizer) { if recognizer.state == NSUIGestureRecognizerState.began { diff --git a/Source/Charts/Charts/RadarChartView.swift b/Source/Charts/Charts/RadarChartView.swift index 2a59deba42..766cdfb1af 100644 --- a/Source/Charts/Charts/RadarChartView.swift +++ b/Source/Charts/Charts/RadarChartView.swift @@ -36,10 +36,10 @@ open class RadarChartView: PieRadarChartViewBase @objc open var drawWeb = true /// modulus that determines how many labels and web-lines are skipped before the next is drawn - fileprivate var _skipWebLineCount = 0 + private var _skipWebLineCount = 0 /// the object reprsenting the y-axis labels - fileprivate var _yAxis: YAxis! + private var _yAxis: YAxis! internal var _yAxisRenderer: YAxisRendererRadarChart! internal var _xAxisRenderer: XAxisRendererRadarChart! diff --git a/Source/Charts/Components/AxisBase.swift b/Source/Charts/Components/AxisBase.swift index b75ff058ce..fbab2c0f71 100644 --- a/Source/Charts/Components/AxisBase.swift +++ b/Source/Charts/Components/AxisBase.swift @@ -22,7 +22,7 @@ open class AxisBase: ComponentBase } /// Custom formatter that is used instead of the auto-formatter if set - fileprivate var _axisValueFormatter: IAxisValueFormatter? + private var _axisValueFormatter: IAxisValueFormatter? @objc open var labelFont = NSUIFont.systemFont(ofSize: 10.0) @objc open var labelTextColor = NSUIColor.black @@ -44,7 +44,7 @@ open class AxisBase: ComponentBase /// flag that indicates of the labels of this axis should be drawn or not @objc open var drawLabelsEnabled = true - fileprivate var _centerAxisLabelsEnabled = false + private var _centerAxisLabelsEnabled = false /// Centers the axis labels instead of drawing them at their original position. /// This is useful especially for grouped BarChart. @@ -60,7 +60,7 @@ open class AxisBase: ComponentBase } /// array of limitlines that can be set for the axis - fileprivate var _limitLines = [ChartLimitLine]() + private var _limitLines = [ChartLimitLine]() /// Are the LimitLines drawn behind the data or in front of the data? /// @@ -82,7 +82,7 @@ open class AxisBase: ComponentBase /// the number of label entries the axis should have /// /// **default**: 6 - fileprivate var _labelCount = Int(6) + private var _labelCount = Int(6) /// the number of decimal digits to use (for the default formatter @objc open var decimals: Int = 0 @@ -93,7 +93,7 @@ open class AxisBase: ComponentBase /// If using granularity this could be avoided by having fewer axis values visible. @objc open var granularityEnabled = false - fileprivate var _granularity = Double(1.0) + private var _granularity = Double(1.0) /// The minimum interval between axis values. /// This can be used to avoid label duplicating when zooming in. diff --git a/Source/Charts/Components/ChartLimitLine.swift b/Source/Charts/Components/ChartLimitLine.swift index 8bfd91ccce..d0d2249888 100644 --- a/Source/Charts/Components/ChartLimitLine.swift +++ b/Source/Charts/Components/ChartLimitLine.swift @@ -29,7 +29,7 @@ open class ChartLimitLine: ComponentBase /// limit / maximum (the y-value or xIndex) @objc open var limit = Double(0.0) - fileprivate var _lineWidth = CGFloat(2.0) + private var _lineWidth = CGFloat(2.0) @objc open var lineColor = NSUIColor(red: 237.0/255.0, green: 91.0/255.0, blue: 91.0/255.0, alpha: 1.0) @objc open var lineDashPhase = CGFloat(0.0) @objc open var lineDashLengths: [CGFloat]? diff --git a/Source/Charts/Components/Legend.swift b/Source/Charts/Components/Legend.swift index d2d6a1bcf8..992342a329 100644 --- a/Source/Charts/Components/Legend.swift +++ b/Source/Charts/Components/Legend.swift @@ -101,7 +101,7 @@ open class Legend: ComponentBase /// Are the legend labels/colors a custom value or auto calculated? If false, then it's auto, if true, then custom. /// /// **default**: false (automatic legend) - fileprivate var _isLegendCustom = false + private var _isLegendCustom = false /// This property is deprecated - Use `horizontalAlignment`, `verticalAlignment`, `orientation`, `drawInside`, `direction`. @objc @available(*, deprecated: 1.0, message: "Use `horizontalAlignment`, `verticalAlignment`, `orientation`, `drawInside`, `direction`.") diff --git a/Source/Charts/Components/YAxis.swift b/Source/Charts/Components/YAxis.swift index 605a69876d..cfe520776e 100644 --- a/Source/Charts/Components/YAxis.swift +++ b/Source/Charts/Components/YAxis.swift @@ -74,7 +74,7 @@ open class YAxis: AxisBase @objc open var labelPosition = LabelPosition.outsideChart /// the side this axis object represents - fileprivate var _axisDependency = AxisDependency.left + private var _axisDependency = AxisDependency.left /// the minimum width that the axis should take /// diff --git a/Source/Charts/Data/Implementations/Standard/BarChartDataEntry.swift b/Source/Charts/Data/Implementations/Standard/BarChartDataEntry.swift index 89243992ad..23fec77eb8 100644 --- a/Source/Charts/Data/Implementations/Standard/BarChartDataEntry.swift +++ b/Source/Charts/Data/Implementations/Standard/BarChartDataEntry.swift @@ -14,16 +14,16 @@ import Foundation open class BarChartDataEntry: ChartDataEntry { /// the values the stacked barchart holds - fileprivate var _yVals: [Double]? + private var _yVals: [Double]? /// the ranges for the individual stack values - automatically calculated - fileprivate var _ranges: [Range]? + private var _ranges: [Range]? /// the sum of all negative values this entry (if stacked) contains - fileprivate var _negativeSum: Double = 0.0 + private var _negativeSum: Double = 0.0 /// the sum of all positive values this entry (if stacked) contains - fileprivate var _positiveSum: Double = 0.0 + private var _positiveSum: Double = 0.0 public required init() { @@ -240,7 +240,7 @@ open class BarChartDataEntry: ChartDataEntry /// /// - parameter vals: /// - returns: - fileprivate static func calcSum(values: [Double]?) -> Double + private static func calcSum(values: [Double]?) -> Double { guard let values = values else { return 0.0 } diff --git a/Source/Charts/Data/Implementations/Standard/BarChartDataSet.swift b/Source/Charts/Data/Implementations/Standard/BarChartDataSet.swift index ceb5ccb8af..27ed7a5722 100644 --- a/Source/Charts/Data/Implementations/Standard/BarChartDataSet.swift +++ b/Source/Charts/Data/Implementations/Standard/BarChartDataSet.swift @@ -15,7 +15,7 @@ import CoreGraphics open class BarChartDataSet: BarLineScatterCandleBubbleChartDataSet, IBarChartDataSet { - fileprivate func initialize() + private func initialize() { self.highlightColor = NSUIColor.black @@ -39,14 +39,14 @@ open class BarChartDataSet: BarLineScatterCandleBubbleChartDataSet, IBarChartDat /// the maximum number of bars that are stacked upon each other, this value /// is calculated from the Entries that are added to the DataSet - fileprivate var _stackSize = 1 + private var _stackSize = 1 /// the overall entry count, including counting each stack-value individually - fileprivate var _entryCountStacks = 0 + private var _entryCountStacks = 0 /// Calculates the total number of entries this DataSet represents, including /// stacks. All values belonging to a stack are calculated separately. - fileprivate func calcEntryCountIncludingStacks(entries: [BarChartDataEntry]) + private func calcEntryCountIncludingStacks(entries: [BarChartDataEntry]) { _entryCountStacks = 0 @@ -64,7 +64,7 @@ open class BarChartDataSet: BarLineScatterCandleBubbleChartDataSet, IBarChartDat } /// calculates the maximum stacksize that occurs in the Entries array of this DataSet - fileprivate func calcStackSize(entries: [BarChartDataEntry]) + private func calcStackSize(entries: [BarChartDataEntry]) { for i in 0 ..< entries.count { diff --git a/Source/Charts/Data/Implementations/Standard/CandleChartDataSet.swift b/Source/Charts/Data/Implementations/Standard/CandleChartDataSet.swift index d4da90d69f..852e65d385 100644 --- a/Source/Charts/Data/Implementations/Standard/CandleChartDataSet.swift +++ b/Source/Charts/Data/Implementations/Standard/CandleChartDataSet.swift @@ -75,7 +75,7 @@ open class CandleChartDataSet: LineScatterCandleRadarChartDataSet, ICandleChartD /// the space between the candle entries /// /// **default**: 0.1 (10%) - fileprivate var _barSpace = CGFloat(0.1) + private var _barSpace = CGFloat(0.1) /// the space that is left out on the left and right side of each candle, /// **default**: 0.1 (10%), max 0.45, min 0.0 diff --git a/Source/Charts/Data/Implementations/Standard/CombinedChartData.swift b/Source/Charts/Data/Implementations/Standard/CombinedChartData.swift index 9492f64de9..9e2342a200 100644 --- a/Source/Charts/Data/Implementations/Standard/CombinedChartData.swift +++ b/Source/Charts/Data/Implementations/Standard/CombinedChartData.swift @@ -13,11 +13,11 @@ import Foundation open class CombinedChartData: BarLineScatterCandleBubbleChartData { - fileprivate var _lineData: LineChartData! - fileprivate var _barData: BarChartData! - fileprivate var _scatterData: ScatterChartData! - fileprivate var _candleData: CandleChartData! - fileprivate var _bubbleData: BubbleChartData! + private var _lineData: LineChartData! + private var _barData: BarChartData! + private var _scatterData: ScatterChartData! + private var _candleData: CandleChartData! + private var _bubbleData: BubbleChartData! public override init() { diff --git a/Source/Charts/Data/Implementations/Standard/LineChartDataSet.swift b/Source/Charts/Data/Implementations/Standard/LineChartDataSet.swift index eae20419cb..357d29604f 100644 --- a/Source/Charts/Data/Implementations/Standard/LineChartDataSet.swift +++ b/Source/Charts/Data/Implementations/Standard/LineChartDataSet.swift @@ -24,7 +24,7 @@ open class LineChartDataSet: LineRadarChartDataSet, ILineChartDataSet case horizontalBezier } - fileprivate func initialize() + private func initialize() { // default color circleColors.append(NSUIColor(red: 140.0/255.0, green: 234.0/255.0, blue: 255.0/255.0, alpha: 1.0)) @@ -51,7 +51,7 @@ open class LineChartDataSet: LineRadarChartDataSet, ILineChartDataSet /// **default**: Linear open var mode: Mode = Mode.linear - fileprivate var _cubicIntensity = CGFloat(0.2) + private var _cubicIntensity = CGFloat(0.2) /// Intensity for cubic lines (min = 0.05, max = 1) /// @@ -176,7 +176,7 @@ open class LineChartDataSet: LineRadarChartDataSet, ILineChartDataSet open var lineCapType = CGLineCap.butt /// formatter for customizing the position of the fill-line - fileprivate var _fillFormatter: IFillFormatter = DefaultFillFormatter() + private var _fillFormatter: IFillFormatter = DefaultFillFormatter() /// Sets a custom IFillFormatter to the chart that handles the position of the filled-line for each DataSet. Set this to null to use the default logic. open var fillFormatter: IFillFormatter? diff --git a/Source/Charts/Data/Implementations/Standard/LineRadarChartDataSet.swift b/Source/Charts/Data/Implementations/Standard/LineRadarChartDataSet.swift index 4fe67697e9..be934257f1 100644 --- a/Source/Charts/Data/Implementations/Standard/LineRadarChartDataSet.swift +++ b/Source/Charts/Data/Implementations/Standard/LineRadarChartDataSet.swift @@ -20,7 +20,7 @@ open class LineRadarChartDataSet: LineScatterCandleRadarChartDataSet, ILineRadar // MARK: - Styling functions and accessors /// The color that is used for filling the line surface area. - fileprivate var _fillColor = NSUIColor(red: 140.0/255.0, green: 234.0/255.0, blue: 255.0/255.0, alpha: 1.0) + private var _fillColor = NSUIColor(red: 140.0/255.0, green: 234.0/255.0, blue: 255.0/255.0, alpha: 1.0) /// The color that is used for filling the line surface area. open var fillColor: NSUIColor @@ -41,7 +41,7 @@ open class LineRadarChartDataSet: LineScatterCandleRadarChartDataSet, ILineRadar /// **default**: 0.33 open var fillAlpha = CGFloat(0.33) - fileprivate var _lineWidth = CGFloat(1.0) + private var _lineWidth = CGFloat(1.0) /// line width of the chart (min = 0.0, max = 10) /// diff --git a/Source/Charts/Data/Implementations/Standard/PieChartDataSet.swift b/Source/Charts/Data/Implementations/Standard/PieChartDataSet.swift index f7fd919046..af4aa617d0 100644 --- a/Source/Charts/Data/Implementations/Standard/PieChartDataSet.swift +++ b/Source/Charts/Data/Implementations/Standard/PieChartDataSet.swift @@ -21,7 +21,7 @@ open class PieChartDataSet: ChartDataSet, IPieChartDataSet case outsideSlice } - fileprivate func initialize() + private func initialize() { self.valueTextColor = NSUIColor.white self.valueFont = NSUIFont.systemFont(ofSize: 13.0) @@ -46,7 +46,7 @@ open class PieChartDataSet: ChartDataSet, IPieChartDataSet // MARK: - Styling functions and accessors - fileprivate var _sliceSpace = CGFloat(0.0) + private var _sliceSpace = CGFloat(0.0) /// the space in pixels between the pie-slices /// **default**: 0 diff --git a/Source/Charts/Data/Implementations/Standard/RadarChartDataSet.swift b/Source/Charts/Data/Implementations/Standard/RadarChartDataSet.swift index fcb3134fba..67b4730a28 100644 --- a/Source/Charts/Data/Implementations/Standard/RadarChartDataSet.swift +++ b/Source/Charts/Data/Implementations/Standard/RadarChartDataSet.swift @@ -15,7 +15,7 @@ import CoreGraphics open class RadarChartDataSet: LineRadarChartDataSet, IRadarChartDataSet { - fileprivate func initialize() + private func initialize() { self.valueFont = NSUIFont.systemFont(ofSize: 13.0) } diff --git a/Source/Charts/Filters/DataApproximator.swift b/Source/Charts/Filters/DataApproximator.swift index 6bc0ee1bd0..6cd5338ff7 100644 --- a/Source/Charts/Filters/DataApproximator.swift +++ b/Source/Charts/Filters/DataApproximator.swift @@ -96,7 +96,7 @@ open class DataApproximator: NSObject } // else don't keep the point... } - fileprivate class Line + private class Line { var sxey: CGFloat var exsy: CGFloat diff --git a/Source/Charts/Formatters/DefaultAxisValueFormatter.swift b/Source/Charts/Formatters/DefaultAxisValueFormatter.swift index dc46a00caa..53b208dc6b 100644 --- a/Source/Charts/Formatters/DefaultAxisValueFormatter.swift +++ b/Source/Charts/Formatters/DefaultAxisValueFormatter.swift @@ -22,7 +22,7 @@ open class DefaultAxisValueFormatter: NSObject, IAxisValueFormatter @objc open var hasAutoDecimals: Bool = false - fileprivate var _formatter: NumberFormatter? + private var _formatter: NumberFormatter? @objc open var formatter: NumberFormatter? { get { return _formatter } @@ -33,7 +33,7 @@ open class DefaultAxisValueFormatter: NSObject, IAxisValueFormatter } } - fileprivate var _decimals: Int? + private var _decimals: Int? open var decimals: Int? { get { return _decimals } diff --git a/Source/Charts/Formatters/DefaultValueFormatter.swift b/Source/Charts/Formatters/DefaultValueFormatter.swift index ce812b6556..aac13f1b41 100644 --- a/Source/Charts/Formatters/DefaultValueFormatter.swift +++ b/Source/Charts/Formatters/DefaultValueFormatter.swift @@ -24,7 +24,7 @@ open class DefaultValueFormatter: NSObject, IValueFormatter @objc open var hasAutoDecimals: Bool = false - fileprivate var _formatter: NumberFormatter? + private var _formatter: NumberFormatter? @objc open var formatter: NumberFormatter? { get { return _formatter } @@ -35,7 +35,7 @@ open class DefaultValueFormatter: NSObject, IValueFormatter } } - fileprivate var _decimals: Int? + private var _decimals: Int? open var decimals: Int? { get { return _decimals } diff --git a/Source/Charts/Highlight/CombinedHighlighter.swift b/Source/Charts/Highlight/CombinedHighlighter.swift index 86e841993c..f7ca82f71c 100644 --- a/Source/Charts/Highlight/CombinedHighlighter.swift +++ b/Source/Charts/Highlight/CombinedHighlighter.swift @@ -16,7 +16,7 @@ import CoreGraphics open class CombinedHighlighter: ChartHighlighter { /// bar highlighter for supporting stacked highlighting - fileprivate var barHighlighter: BarHighlighter? + private var barHighlighter: BarHighlighter? @objc public init(chart: CombinedChartDataProvider, barDataProvider: BarChartDataProvider) { diff --git a/Source/Charts/Highlight/Highlight.swift b/Source/Charts/Highlight/Highlight.swift index 80778f7663..a33127b8ba 100644 --- a/Source/Charts/Highlight/Highlight.swift +++ b/Source/Charts/Highlight/Highlight.swift @@ -22,10 +22,10 @@ open class Highlight: NSObject fileprivate var _y = Double.nan /// the x-pixel of the highlight - fileprivate var _xPx = CGFloat.nan + private var _xPx = CGFloat.nan /// the y-pixel of the highlight - fileprivate var _yPx = CGFloat.nan + private var _yPx = CGFloat.nan /// the index of the data object - in case it refers to more than one @objc open var dataIndex = Int(-1) @@ -39,7 +39,7 @@ open class Highlight: NSObject fileprivate var _stackIndex = Int(-1) /// the axis the highlighted value belongs to - fileprivate var _axis: YAxis.AxisDependency = YAxis.AxisDependency.left + private var _axis: YAxis.AxisDependency = YAxis.AxisDependency.left /// the x-position (pixels) on which this highlight object was last drawn @objc open var drawX: CGFloat = 0.0 diff --git a/Source/Charts/Jobs/AnimatedViewPortJob.swift b/Source/Charts/Jobs/AnimatedViewPortJob.swift index 00fc1f1fb4..5a9b0d132b 100644 --- a/Source/Charts/Jobs/AnimatedViewPortJob.swift +++ b/Source/Charts/Jobs/AnimatedViewPortJob.swift @@ -22,12 +22,12 @@ open class AnimatedViewPortJob: ViewPortJob internal var xOrigin: CGFloat = 0.0 internal var yOrigin: CGFloat = 0.0 - fileprivate var _startTime: TimeInterval = 0.0 - fileprivate var _displayLink: NSUIDisplayLink! - fileprivate var _duration: TimeInterval = 0.0 - fileprivate var _endTime: TimeInterval = 0.0 + private var _startTime: TimeInterval = 0.0 + private var _displayLink: NSUIDisplayLink! + private var _duration: TimeInterval = 0.0 + private var _endTime: TimeInterval = 0.0 - fileprivate var _easing: ChartEasingFunctionBlock? + private var _easing: ChartEasingFunctionBlock? @objc public init( viewPortHandler: ViewPortHandler, @@ -93,7 +93,7 @@ open class AnimatedViewPortJob: ViewPortJob } } - fileprivate func updateAnimationPhase(_ currentTime: TimeInterval) + private func updateAnimationPhase(_ currentTime: TimeInterval) { let elapsedTime: TimeInterval = currentTime - _startTime let duration: TimeInterval = _duration @@ -113,7 +113,7 @@ open class AnimatedViewPortJob: ViewPortJob } } - @objc fileprivate func animationLoop() + @objc private func animationLoop() { let currentTime: TimeInterval = CACurrentMediaTime() diff --git a/Source/Charts/Renderers/BarChartRenderer.swift b/Source/Charts/Renderers/BarChartRenderer.swift index 8c3ab6e9b4..3621ddbf9c 100644 --- a/Source/Charts/Renderers/BarChartRenderer.swift +++ b/Source/Charts/Renderers/BarChartRenderer.swift @@ -18,7 +18,7 @@ import CoreGraphics open class BarChartRenderer: BarLineScatterCandleBubbleRenderer { - fileprivate class Buffer + private class Buffer { var rects = [CGRect]() } @@ -33,7 +33,7 @@ open class BarChartRenderer: BarLineScatterCandleBubbleRenderer } // [CGRect] per dataset - fileprivate var _buffers = [Buffer]() + private var _buffers = [Buffer]() open override func initBuffers() { @@ -68,7 +68,7 @@ open class BarChartRenderer: BarLineScatterCandleBubbleRenderer } } - fileprivate func prepareBuffer(dataSet: IBarChartDataSet, index: Int) + private func prepareBuffer(dataSet: IBarChartDataSet, index: Int) { guard let dataProvider = dataProvider, @@ -203,7 +203,7 @@ open class BarChartRenderer: BarLineScatterCandleBubbleRenderer } } - fileprivate var _barShadowRectBuffer: CGRect = CGRect() + private var _barShadowRectBuffer: CGRect = CGRect() @objc open func drawDataSet(context: CGContext, dataSet: IBarChartDataSet, index: Int) { diff --git a/Source/Charts/Renderers/BubbleChartRenderer.swift b/Source/Charts/Renderers/BubbleChartRenderer.swift index cd727cf853..8498070c17 100644 --- a/Source/Charts/Renderers/BubbleChartRenderer.swift +++ b/Source/Charts/Renderers/BubbleChartRenderer.swift @@ -41,7 +41,7 @@ open class BubbleChartRenderer: BarLineScatterCandleBubbleRenderer } } - fileprivate func getShapeSize( + private func getShapeSize( entrySize: CGFloat, maxSize: CGFloat, reference: CGFloat, @@ -54,8 +54,8 @@ open class BubbleChartRenderer: BarLineScatterCandleBubbleRenderer return shapeSize } - fileprivate var _pointBuffer = CGPoint() - fileprivate var _sizeBuffer = [CGPoint](repeating: CGPoint(), count: 2) + private var _pointBuffer = CGPoint() + private var _sizeBuffer = [CGPoint](repeating: CGPoint(), count: 2) @objc open func drawDataSet(context: CGContext, dataSet: IBubbleChartDataSet) { diff --git a/Source/Charts/Renderers/CandleStickChartRenderer.swift b/Source/Charts/Renderers/CandleStickChartRenderer.swift index 2a3eddcdec..28a460d9fe 100644 --- a/Source/Charts/Renderers/CandleStickChartRenderer.swift +++ b/Source/Charts/Renderers/CandleStickChartRenderer.swift @@ -41,12 +41,12 @@ open class CandleStickChartRenderer: LineScatterCandleRadarRenderer } } - fileprivate var _shadowPoints = [CGPoint](repeating: CGPoint(), count: 4) - fileprivate var _rangePoints = [CGPoint](repeating: CGPoint(), count: 2) - fileprivate var _openPoints = [CGPoint](repeating: CGPoint(), count: 2) - fileprivate var _closePoints = [CGPoint](repeating: CGPoint(), count: 2) - fileprivate var _bodyRect = CGRect() - fileprivate var _lineSegments = [CGPoint](repeating: CGPoint(), count: 2) + private var _shadowPoints = [CGPoint](repeating: CGPoint(), count: 4) + private var _rangePoints = [CGPoint](repeating: CGPoint(), count: 2) + private var _openPoints = [CGPoint](repeating: CGPoint(), count: 2) + private var _closePoints = [CGPoint](repeating: CGPoint(), count: 2) + private var _bodyRect = CGRect() + private var _lineSegments = [CGPoint](repeating: CGPoint(), count: 2) @objc open func drawDataSet(context: CGContext, dataSet: ICandleChartDataSet) { diff --git a/Source/Charts/Renderers/HorizontalBarChartRenderer.swift b/Source/Charts/Renderers/HorizontalBarChartRenderer.swift index 00e1f3d86a..23925c4d60 100644 --- a/Source/Charts/Renderers/HorizontalBarChartRenderer.swift +++ b/Source/Charts/Renderers/HorizontalBarChartRenderer.swift @@ -19,7 +19,7 @@ import CoreGraphics open class HorizontalBarChartRenderer: BarChartRenderer { - fileprivate class Buffer + private class Buffer { var rects = [CGRect]() } @@ -30,7 +30,7 @@ open class HorizontalBarChartRenderer: BarChartRenderer } // [CGRect] per dataset - fileprivate var _buffers = [Buffer]() + private var _buffers = [Buffer]() open override func initBuffers() { @@ -65,7 +65,7 @@ open class HorizontalBarChartRenderer: BarChartRenderer } } - fileprivate func prepareBuffer(dataSet: IBarChartDataSet, index: Int) + private func prepareBuffer(dataSet: IBarChartDataSet, index: Int) { guard let dataProvider = dataProvider, @@ -177,7 +177,7 @@ open class HorizontalBarChartRenderer: BarChartRenderer } } - fileprivate var _barShadowRectBuffer: CGRect = CGRect() + private var _barShadowRectBuffer: CGRect = CGRect() open override func drawDataSet(context: CGContext, dataSet: IBarChartDataSet, index: Int) { diff --git a/Source/Charts/Renderers/LegendRenderer.swift b/Source/Charts/Renderers/LegendRenderer.swift index 2ecbd780cc..38c3648537 100755 --- a/Source/Charts/Renderers/LegendRenderer.swift +++ b/Source/Charts/Renderers/LegendRenderer.swift @@ -488,7 +488,7 @@ open class LegendRenderer: Renderer } } - fileprivate var _formLineSegmentsBuffer = [CGPoint](repeating: CGPoint(), count: 2) + private var _formLineSegmentsBuffer = [CGPoint](repeating: CGPoint(), count: 2) /// Draws the Legend-form at the given position with the color at the given index. @objc open func drawForm( diff --git a/Source/Charts/Renderers/LineChartRenderer.swift b/Source/Charts/Renderers/LineChartRenderer.swift index b1c2b816f2..24c5fdf285 100644 --- a/Source/Charts/Renderers/LineChartRenderer.swift +++ b/Source/Charts/Renderers/LineChartRenderer.swift @@ -282,7 +282,7 @@ open class LineChartRenderer: LineRadarRenderer } } - fileprivate var _lineSegments = [CGPoint](repeating: CGPoint(), count: 2) + private var _lineSegments = [CGPoint](repeating: CGPoint(), count: 2) @objc open func drawLinear(context: CGContext, dataSet: ILineChartDataSet) { @@ -453,7 +453,7 @@ open class LineChartRenderer: LineRadarRenderer } /// Generates the path that is used for filled drawing. - fileprivate func generateFilledPath(dataSet: ILineChartDataSet, fillMin: CGFloat, bounds: XBounds, matrix: CGAffineTransform) -> CGPath + private func generateFilledPath(dataSet: ILineChartDataSet, fillMin: CGFloat, bounds: XBounds, matrix: CGAffineTransform) -> CGPath { let phaseY = animator.phaseY let isDrawSteppedEnabled = dataSet.mode == .stepped @@ -589,7 +589,7 @@ open class LineChartRenderer: LineRadarRenderer drawCircles(context: context) } - fileprivate func drawCircles(context: CGContext) + private func drawCircles(context: CGContext) { guard let dataProvider = dataProvider, diff --git a/Source/Charts/Renderers/PieChartRenderer.swift b/Source/Charts/Renderers/PieChartRenderer.swift index 23bc60b515..b877652c96 100644 --- a/Source/Charts/Renderers/PieChartRenderer.swift +++ b/Source/Charts/Renderers/PieChartRenderer.swift @@ -552,7 +552,7 @@ open class PieChartRenderer: DataRenderer } /// draws the hole in the center of the chart and the transparent circle / hole - fileprivate func drawHole(context: CGContext) + private func drawHole(context: CGContext) { guard let chart = chart else { return } @@ -608,7 +608,7 @@ open class PieChartRenderer: DataRenderer } /// draws the description text in the center of the pie chart makes most sense when center-hole is enabled - fileprivate func drawCenterText(context: CGContext) + private func drawCenterText(context: CGContext) { guard let chart = chart, diff --git a/Source/Charts/Renderers/RadarChartRenderer.swift b/Source/Charts/Renderers/RadarChartRenderer.swift index 3fccdbdd94..ab4890f646 100644 --- a/Source/Charts/Renderers/RadarChartRenderer.swift +++ b/Source/Charts/Renderers/RadarChartRenderer.swift @@ -218,7 +218,7 @@ open class RadarChartRenderer: LineRadarRenderer drawWeb(context: context) } - fileprivate var _webLineSegmentsBuffer = [CGPoint](repeating: CGPoint(), count: 2) + private var _webLineSegmentsBuffer = [CGPoint](repeating: CGPoint(), count: 2) @objc open func drawWeb(context: CGContext) { @@ -289,7 +289,7 @@ open class RadarChartRenderer: LineRadarRenderer context.restoreGState() } - fileprivate var _highlightPointBuffer = CGPoint() + private var _highlightPointBuffer = CGPoint() open override func drawHighlighted(context: CGContext, indices: [Highlight]) { diff --git a/Source/Charts/Renderers/ScatterChartRenderer.swift b/Source/Charts/Renderers/ScatterChartRenderer.swift index d187eb0023..010ca16791 100644 --- a/Source/Charts/Renderers/ScatterChartRenderer.swift +++ b/Source/Charts/Renderers/ScatterChartRenderer.swift @@ -48,7 +48,7 @@ open class ScatterChartRenderer: LineScatterCandleRadarRenderer } } - fileprivate var _lineSegments = [CGPoint](repeating: CGPoint(), count: 2) + private var _lineSegments = [CGPoint](repeating: CGPoint(), count: 2) @objc open func drawDataSet(context: CGContext, dataSet: IScatterChartDataSet) { diff --git a/Source/Charts/Renderers/XAxisRenderer.swift b/Source/Charts/Renderers/XAxisRenderer.swift index 7ae5106cb4..0c84cf4aef 100644 --- a/Source/Charts/Renderers/XAxisRenderer.swift +++ b/Source/Charts/Renderers/XAxisRenderer.swift @@ -115,7 +115,7 @@ open class XAxisRenderer: AxisRendererBase } } - fileprivate var _axisLineSegmentsBuffer = [CGPoint](repeating: CGPoint(), count: 2) + private var _axisLineSegmentsBuffer = [CGPoint](repeating: CGPoint(), count: 2) open override func renderAxisLine(context: CGContext) { diff --git a/Source/Charts/Renderers/XAxisRendererHorizontalBarChart.swift b/Source/Charts/Renderers/XAxisRendererHorizontalBarChart.swift index d6daa25ef8..674aa83fe4 100644 --- a/Source/Charts/Renderers/XAxisRendererHorizontalBarChart.swift +++ b/Source/Charts/Renderers/XAxisRendererHorizontalBarChart.swift @@ -190,7 +190,7 @@ open class XAxisRendererHorizontalBarChart: XAxisRenderer return contentRect } - fileprivate var _gridLineSegmentsBuffer = [CGPoint](repeating: CGPoint(), count: 2) + private var _gridLineSegmentsBuffer = [CGPoint](repeating: CGPoint(), count: 2) open override func drawGridLine(context: CGContext, x: CGFloat, y: CGFloat) { diff --git a/Source/Charts/Renderers/YAxisRendererHorizontalBarChart.swift b/Source/Charts/Renderers/YAxisRendererHorizontalBarChart.swift index 185044a245..ba7c51f17f 100644 --- a/Source/Charts/Renderers/YAxisRendererHorizontalBarChart.swift +++ b/Source/Charts/Renderers/YAxisRendererHorizontalBarChart.swift @@ -249,7 +249,7 @@ open class YAxisRendererHorizontalBarChart: YAxisRenderer context.drawPath(using: CGPathDrawingMode.stroke) } - fileprivate var _limitLineSegmentsBuffer = [CGPoint](repeating: CGPoint(), count: 2) + private var _limitLineSegmentsBuffer = [CGPoint](repeating: CGPoint(), count: 2) open override func renderLimitLines(context: CGContext) { diff --git a/Source/Charts/Renderers/YAxisRendererRadarChart.swift b/Source/Charts/Renderers/YAxisRendererRadarChart.swift index e34b7d8009..b23b987556 100644 --- a/Source/Charts/Renderers/YAxisRendererRadarChart.swift +++ b/Source/Charts/Renderers/YAxisRendererRadarChart.swift @@ -18,7 +18,7 @@ import CoreGraphics open class YAxisRendererRadarChart: YAxisRenderer { - fileprivate weak var chart: RadarChartView? + private weak var chart: RadarChartView? @objc public init(viewPortHandler: ViewPortHandler, yAxis: YAxis?, chart: RadarChartView) { diff --git a/Source/Charts/Utils/ChartUtils.swift b/Source/Charts/Utils/ChartUtils.swift index a1c56ab477..3169e1b75c 100755 --- a/Source/Charts/Utils/ChartUtils.swift +++ b/Source/Charts/Utils/ChartUtils.swift @@ -32,7 +32,7 @@ extension CGSize { open class ChartUtils { - fileprivate static var _defaultValueFormatter: IValueFormatter = ChartUtils.generateDefaultValueFormatter() + private static var _defaultValueFormatter: IValueFormatter = ChartUtils.generateDefaultValueFormatter() internal struct Math { @@ -276,7 +276,7 @@ open class ChartUtils return angle.truncatingRemainder(dividingBy: 360.0) } - fileprivate class func generateDefaultValueFormatter() -> IValueFormatter + private class func generateDefaultValueFormatter() -> IValueFormatter { let formatter = DefaultValueFormatter(decimals: 1) return formatter diff --git a/Source/Charts/Utils/Fill.swift b/Source/Charts/Utils/Fill.swift index 58c6fe693e..88f6f71109 100644 --- a/Source/Charts/Utils/Fill.swift +++ b/Source/Charts/Utils/Fill.swift @@ -27,16 +27,16 @@ public enum FillType: Int @objc(ChartFill) open class Fill: NSObject { - fileprivate var _type: FillType = FillType.empty - fileprivate var _color: CGColor? - fileprivate var _gradient: CGGradient? - fileprivate var _gradientAngle: CGFloat = 0.0 - fileprivate var _gradientStartOffsetPercent: CGPoint = CGPoint() - fileprivate var _gradientStartRadiusPercent: CGFloat = 0.0 - fileprivate var _gradientEndOffsetPercent: CGPoint = CGPoint() - fileprivate var _gradientEndRadiusPercent: CGFloat = 0.0 - fileprivate var _image: CGImage? - fileprivate var _layer: CGLayer? + private var _type: FillType = FillType.empty + private var _color: CGColor? + private var _gradient: CGGradient? + private var _gradientAngle: CGFloat = 0.0 + private var _gradientStartOffsetPercent: CGPoint = CGPoint() + private var _gradientStartRadiusPercent: CGFloat = 0.0 + private var _gradientEndOffsetPercent: CGPoint = CGPoint() + private var _gradientEndRadiusPercent: CGFloat = 0.0 + private var _image: CGImage? + private var _layer: CGLayer? // MARK: Properties diff --git a/Source/Charts/Utils/ViewPortHandler.swift b/Source/Charts/Utils/ViewPortHandler.swift index c787fc6a67..db45d61cb3 100755 --- a/Source/Charts/Utils/ViewPortHandler.swift +++ b/Source/Charts/Utils/ViewPortHandler.swift @@ -17,44 +17,44 @@ import CoreGraphics open class ViewPortHandler: NSObject { /// matrix used for touch events - fileprivate var _touchMatrix = CGAffineTransform.identity + private var _touchMatrix = CGAffineTransform.identity /// this rectangle defines the area in which graph values can be drawn - fileprivate var _contentRect = CGRect() + private var _contentRect = CGRect() - fileprivate var _chartWidth = CGFloat(0.0) - fileprivate var _chartHeight = CGFloat(0.0) + private var _chartWidth = CGFloat(0.0) + private var _chartHeight = CGFloat(0.0) /// minimum scale value on the y-axis - fileprivate var _minScaleY = CGFloat(1.0) + private var _minScaleY = CGFloat(1.0) /// maximum scale value on the y-axis - fileprivate var _maxScaleY = CGFloat.greatestFiniteMagnitude + private var _maxScaleY = CGFloat.greatestFiniteMagnitude /// minimum scale value on the x-axis - fileprivate var _minScaleX = CGFloat(1.0) + private var _minScaleX = CGFloat(1.0) /// maximum scale value on the x-axis - fileprivate var _maxScaleX = CGFloat.greatestFiniteMagnitude + private var _maxScaleX = CGFloat.greatestFiniteMagnitude /// contains the current scale factor of the x-axis - fileprivate var _scaleX = CGFloat(1.0) + private var _scaleX = CGFloat(1.0) /// contains the current scale factor of the y-axis - fileprivate var _scaleY = CGFloat(1.0) + private var _scaleY = CGFloat(1.0) /// current translation (drag distance) on the x-axis - fileprivate var _transX = CGFloat(0.0) + private var _transX = CGFloat(0.0) /// current translation (drag distance) on the y-axis - fileprivate var _transY = CGFloat(0.0) + private var _transY = CGFloat(0.0) /// offset that allows the chart to be dragged over its bounds on the x-axis - fileprivate var _transOffsetX = CGFloat(0.0) + private var _transOffsetX = CGFloat(0.0) /// offset that allows the chart to be dragged over its bounds on the x-axis - fileprivate var _transOffsetY = CGFloat(0.0) - + private var _transOffsetY = CGFloat(0.0) + /// Constructor - don't forget calling setChartDimens(...) @objc public init(width: CGFloat, height: CGFloat) { @@ -268,7 +268,7 @@ open class ViewPortHandler: NSObject } /// limits the maximum scale and X translation of the given matrix - fileprivate func limitTransAndScale(matrix: inout CGAffineTransform, content: CGRect?) + private func limitTransAndScale(matrix: inout CGAffineTransform, content: CGRect?) { // min scale-x is 1 _scaleX = min(max(_minScaleX, matrix.a), _maxScaleX)