Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed @objc from internal properties #3038

Merged
merged 1 commit into from
Dec 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions Source/Charts/Charts/BarLineChartViewBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD
{
/// the maximum number of entries to which values will be drawn
/// (entry numbers greater than this value will cause value-labels to disappear)
@objc internal var _maxVisibleCount = 100
internal var _maxVisibleCount = 100

/// flag that indicates if auto scaling on the y axis is enabled
fileprivate var _autoScaleMinMaxEnabled = false
Expand Down Expand Up @@ -58,25 +58,25 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD
@objc open var keepPositionOnRotation: Bool = false

/// the object representing the left y-axis
@objc internal var _leftAxis: YAxis!
internal var _leftAxis: YAxis!

/// the object representing the right y-axis
@objc internal var _rightAxis: YAxis!
internal var _rightAxis: YAxis!

@objc internal var _leftYAxisRenderer: YAxisRenderer!
@objc internal var _rightYAxisRenderer: YAxisRenderer!
internal var _leftYAxisRenderer: YAxisRenderer!
internal var _rightYAxisRenderer: YAxisRenderer!

@objc internal var _leftAxisTransformer: Transformer!
@objc internal var _rightAxisTransformer: Transformer!
internal var _leftAxisTransformer: Transformer!
internal var _rightAxisTransformer: Transformer!

@objc internal var _xAxisRenderer: XAxisRenderer!
internal var _xAxisRenderer: XAxisRenderer!

@objc internal var _tapGestureRecognizer: NSUITapGestureRecognizer!
@objc internal var _doubleTapGestureRecognizer: NSUITapGestureRecognizer!
internal var _tapGestureRecognizer: NSUITapGestureRecognizer!
internal var _doubleTapGestureRecognizer: NSUITapGestureRecognizer!
#if !os(tvOS)
@objc internal var _pinchGestureRecognizer: NSUIPinchGestureRecognizer!
internal var _pinchGestureRecognizer: NSUIPinchGestureRecognizer!
#endif
@objc internal var _panGestureRecognizer: NSUIPanGestureRecognizer!
internal var _panGestureRecognizer: NSUIPanGestureRecognizer!

/// flag that indicates if a custom viewport offset has been set
fileprivate var _customViewPortEnabled = false
Expand Down Expand Up @@ -276,7 +276,7 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD
fileprivate var _autoScaleLastHighestVisibleX: Double?

/// Performs auto scaling of the axis by recalculating the minimum and maximum y-values based on the entries currently in view.
@objc internal func autoScale()
internal func autoScale()
{
guard let data = _data
else { return }
Expand All @@ -300,13 +300,13 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD
calculateOffsets()
}

@objc internal func prepareValuePxMatrix()
internal func prepareValuePxMatrix()
{
_rightAxisTransformer.prepareMatrixValuePx(chartXMin: _xAxis._axisMinimum, deltaX: CGFloat(xAxis.axisRange), deltaY: CGFloat(_rightAxis.axisRange), chartYMin: _rightAxis._axisMinimum)
_leftAxisTransformer.prepareMatrixValuePx(chartXMin: xAxis._axisMinimum, deltaX: CGFloat(xAxis.axisRange), deltaY: CGFloat(_leftAxis.axisRange), chartYMin: _leftAxis._axisMinimum)
}

@objc internal func prepareOffsetMatrix()
internal func prepareOffsetMatrix()
{
_rightAxisTransformer.prepareMatrixOffset(inverted: _rightAxis.isInverted)
_leftAxisTransformer.prepareMatrixOffset(inverted: _leftAxis.isInverted)
Expand Down Expand Up @@ -468,7 +468,7 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD
}

/// draws the grid background
@objc internal func drawGridBackground(context: CGContext)
internal func drawGridBackground(context: CGContext)
{
if drawGridBackgroundEnabled || drawBordersEnabled
{
Expand Down
32 changes: 16 additions & 16 deletions Source/Charts/Charts/ChartViewBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate
}

/// The default IValueFormatter that has been determined by the chart considering the provided minimum and maximum values.
@objc internal var _defaultValueFormatter: IValueFormatter? = DefaultValueFormatter(decimals: 0)
internal var _defaultValueFormatter: IValueFormatter? = DefaultValueFormatter(decimals: 0)

/// object that holds all data that was originally set for the chart, before it was modified or any filtering algorithms had been applied
@objc internal var _data: ChartData?
internal var _data: ChartData?

/// Flag that indicates if highlighting per tap (touch) is enabled
fileprivate var _highlightPerTapEnabled = true
Expand All @@ -64,10 +64,10 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate
fileprivate var _dragDecelerationFrictionCoef: CGFloat = 0.9

/// if true, units are drawn next to the values in the chart
@objc internal var _drawUnitInChart = false
internal var _drawUnitInChart = false

/// The object representing the labels on the x-axis
@objc internal var _xAxis: XAxis!
internal var _xAxis: XAxis!

/// The `Description` object of the chart.
/// This should have been called just "description", but
Expand Down Expand Up @@ -126,7 +126,7 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate
}

/// The legend object containing all data associated with the legend
@objc internal var _legend: Legend!
internal var _legend: Legend!

/// delegate to receive chart events
@objc open weak var delegate: ChartViewDelegate?
Expand All @@ -140,24 +140,24 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate
/// color of the no data text
@objc open var noDataTextColor: NSUIColor = NSUIColor.black

@objc internal var _legendRenderer: LegendRenderer!
internal var _legendRenderer: LegendRenderer!

/// object responsible for rendering the data
@objc open var renderer: DataRenderer?

@objc open var highlighter: IHighlighter?

/// object that manages the bounds and drawing constraints of the chart
@objc internal var _viewPortHandler: ViewPortHandler!
internal var _viewPortHandler: ViewPortHandler!

/// object responsible for animations
@objc internal var _animator: Animator!
internal var _animator: Animator!

/// flag that indicates if offsets calculation has already been done or not
fileprivate var _offsetsCalculated = false

/// array of Highlight objects that reference the highlighted slices in the chart
@objc internal var _indicesToHighlight = [Highlight]()
internal var _indicesToHighlight = [Highlight]()

/// `true` if drawing the marker is enabled when tapping on values
/// (use the `marker` property to specify a marker)
Expand Down Expand Up @@ -212,7 +212,7 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate
self.removeObserver(self, forKeyPath: "frame")
}

@objc internal func initialize()
internal func initialize()
{
#if os(iOS)
self.backgroundColor = NSUIColor.clear
Expand Down Expand Up @@ -311,19 +311,19 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate
}

/// Calculates the offsets of the chart to the border depending on the position of an eventual legend or depending on the length of the y-axis and x-axis labels and their position
@objc internal func calculateOffsets()
internal func calculateOffsets()
{
fatalError("calculateOffsets() cannot be called on ChartViewBase")
}

/// calcualtes the y-min and y-max value and the y-delta and x-delta value
@objc internal func calcMinMax()
internal func calcMinMax()
{
fatalError("calcMinMax() cannot be called on ChartViewBase")
}

/// calculates the required number of digits for the values that might be drawn in the chart (if enabled), and creates the default value formatter
@objc internal func setupDefaultFormatter(min: Double, max: Double)
internal func setupDefaultFormatter(min: Double, max: Double)
{
// check if a custom formatter is set or not
var reference = Double(0.0)
Expand Down Expand Up @@ -384,7 +384,7 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate
}

/// Draws the description text in the bottom right corner of the chart (per default)
@objc internal func drawDescription(context: CGContext)
internal func drawDescription(context: CGContext)
{
// check if description should be drawn
guard
Expand Down Expand Up @@ -587,7 +587,7 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate
// MARK: - Markers

/// draws all MarkerViews on the highlighted positions
@objc internal func drawMarkers(context: CGContext)
internal func drawMarkers(context: CGContext)
{
// if there is no marker view or drawing marker is disabled
guard
Expand Down Expand Up @@ -886,7 +886,7 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate
return true
}

@objc internal var _viewportJobs = [ViewPortJob]()
internal var _viewportJobs = [ViewPortJob]()

open override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?)
{
Expand Down
2 changes: 1 addition & 1 deletion Source/Charts/Charts/CombinedChartView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import CoreGraphics
open class CombinedChartView: BarLineChartViewBase, CombinedChartDataProvider
{
/// the fill-formatter used for determining the position of the fill-line
@objc internal var _fillFormatter: IFillFormatter!
internal var _fillFormatter: IFillFormatter!

/// enum that allows to specify the order in which the different data objects for the combined-chart are drawn
@objc(CombinedChartDrawOrder)
Expand Down
12 changes: 6 additions & 6 deletions Source/Charts/Charts/PieRadarChartViewBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -366,14 +366,14 @@ open class PieRadarChartViewBase: ChartViewBase
}

/// - returns: The required offset for the chart legend.
@objc internal var requiredLegendOffset: CGFloat
internal var requiredLegendOffset: CGFloat
{
fatalError("requiredLegendOffset cannot be called on PieRadarChartViewBase")
}

/// - returns: The base offset needed for the chart without calculating the
/// legend size.
@objc internal var requiredBaseOffset: CGFloat
internal var requiredBaseOffset: CGFloat
{
fatalError("requiredBaseOffset cannot be called on PieRadarChartViewBase")
}
Expand Down Expand Up @@ -481,7 +481,7 @@ open class PieRadarChartViewBase: ChartViewBase
fileprivate var _decelerationDisplayLink: NSUIDisplayLink!
fileprivate var _decelerationAngularVelocity: CGFloat = 0.0

@objc internal final func processRotationGestureBegan(location: CGPoint)
internal final func processRotationGestureBegan(location: CGPoint)
{
self.resetVelocity()

Expand All @@ -495,7 +495,7 @@ open class PieRadarChartViewBase: ChartViewBase
_rotationGestureStartPoint = location
}

@objc internal final func processRotationGestureMoved(location: CGPoint)
internal final func processRotationGestureMoved(location: CGPoint)
{
if isDragDecelerationEnabled
{
Expand All @@ -518,7 +518,7 @@ open class PieRadarChartViewBase: ChartViewBase
}
}

@objc internal final func processRotationGestureEnded(location: CGPoint)
internal final func processRotationGestureEnded(location: CGPoint)
{
if isDragDecelerationEnabled
{
Expand All @@ -537,7 +537,7 @@ open class PieRadarChartViewBase: ChartViewBase
}
}

@objc internal final func processRotationGestureCancelled()
internal final func processRotationGestureCancelled()
{
if _isRotating
{
Expand Down
4 changes: 2 additions & 2 deletions Source/Charts/Charts/RadarChartView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ open class RadarChartView: PieRadarChartViewBase
/// the object reprsenting the y-axis labels
fileprivate var _yAxis: YAxis!

@objc internal var _yAxisRenderer: YAxisRendererRadarChart!
@objc internal var _xAxisRenderer: XAxisRendererRadarChart!
internal var _yAxisRenderer: YAxisRendererRadarChart!
internal var _xAxisRenderer: XAxisRendererRadarChart!

public override init(frame: CGRect)
{
Expand Down
8 changes: 4 additions & 4 deletions Source/Charts/Components/AxisBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -195,20 +195,20 @@ open class AxisBase: ComponentBase
@objc open var spaceMax: Double = 0.0

/// Flag indicating that the axis-min value has been customized
@objc internal var _customAxisMin: Bool = false
internal var _customAxisMin: Bool = false

/// Flag indicating that the axis-max value has been customized
@objc internal var _customAxisMax: Bool = false
internal var _customAxisMax: Bool = false

/// Do not touch this directly, instead, use axisMinimum.
/// This is automatically calculated to represent the real min value,
/// and is used when calculating the effective minimum.
@objc internal var _axisMinimum = Double(0)
internal var _axisMinimum = Double(0)

/// Do not touch this directly, instead, use axisMaximum.
/// This is automatically calculated to represent the real max value,
/// and is used when calculating the effective maximum.
@objc internal var _axisMaximum = Double(0)
internal var _axisMaximum = Double(0)

/// the total range of values this axis covers
@objc open var axisRange = Double(0)
Expand Down
2 changes: 1 addition & 1 deletion Source/Charts/Data/Implementations/ChartBaseDataSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ open class ChartBaseDataSet: NSObject, IChartDataSet
open var isHighlightEnabled: Bool { return highlightEnabled }

/// Custom formatter that is used instead of the auto-formatter if set
@objc internal var _valueFormatter: IValueFormatter?
internal var _valueFormatter: IValueFormatter?

/// Custom formatter that is used instead of the auto-formatter if set
open var valueFormatter: IValueFormatter?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ open class BubbleChartDataSet: BarLineScatterCandleBubbleChartDataSet, IBubbleCh
{
// MARK: - Data functions and accessors

@objc internal var _maxSize = CGFloat(0.0)
internal var _maxSize = CGFloat(0.0)

open var maxSize: CGFloat { return _maxSize }
@objc open var normalizeSizeEnabled: Bool = true
Expand Down
24 changes: 12 additions & 12 deletions Source/Charts/Data/Implementations/Standard/ChartData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ import Foundation

open class ChartData: NSObject
{
@objc internal var _yMax: Double = -Double.greatestFiniteMagnitude
@objc internal var _yMin: Double = Double.greatestFiniteMagnitude
@objc internal var _xMax: Double = -Double.greatestFiniteMagnitude
@objc internal var _xMin: Double = Double.greatestFiniteMagnitude
@objc internal var _leftAxisMax: Double = -Double.greatestFiniteMagnitude
@objc internal var _leftAxisMin: Double = Double.greatestFiniteMagnitude
@objc internal var _rightAxisMax: Double = -Double.greatestFiniteMagnitude
@objc internal var _rightAxisMin: Double = Double.greatestFiniteMagnitude
internal var _yMax: Double = -Double.greatestFiniteMagnitude
internal var _yMin: Double = Double.greatestFiniteMagnitude
internal var _xMax: Double = -Double.greatestFiniteMagnitude
internal var _xMin: Double = Double.greatestFiniteMagnitude
internal var _leftAxisMax: Double = -Double.greatestFiniteMagnitude
internal var _leftAxisMin: Double = Double.greatestFiniteMagnitude
internal var _rightAxisMax: Double = -Double.greatestFiniteMagnitude
internal var _rightAxisMin: Double = Double.greatestFiniteMagnitude

@objc internal var _dataSets = [IChartDataSet]()
internal var _dataSets = [IChartDataSet]()

public override init()
{
Expand All @@ -45,7 +45,7 @@ open class ChartData: NSObject
self.init(dataSets: dataSet === nil ? nil : [dataSet!])
}

@objc internal func initialize(dataSets: [IChartDataSet])
internal func initialize(dataSets: [IChartDataSet])
{
notifyDataChanged()
}
Expand Down Expand Up @@ -350,7 +350,7 @@ open class ChartData: NSObject
/// - parameter type:
/// - parameter ignorecase: if true, the search is not case-sensitive
/// - returns: The index of the DataSet Object with the given label. Sensitive or not.
@objc internal func getDataSetIndexByLabel(_ label: String, ignorecase: Bool) -> Int
internal func getDataSetIndexByLabel(_ label: String, ignorecase: Bool) -> Int
{
if ignorecase
{
Expand Down Expand Up @@ -381,7 +381,7 @@ open class ChartData: NSObject
}

/// - returns: The labels of all DataSets as a string array.
@objc internal func dataSetLabels() -> [String]
internal func dataSetLabels() -> [String]
{
var types = [String]()

Expand Down
Loading