Skip to content

Commit

Permalink
Removed methods and properties deprecated in 1.0 (#2996)
Browse files Browse the repository at this point in the history
* Removed methods and properties deprecated in 1.0

* Removed old bridging functions

These were only being used by deprecated methods.

* Pulled latest master
  • Loading branch information
jjatie authored and liuxuan30 committed Dec 18, 2017
1 parent f1acb2a commit ecdd295
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 660 deletions.
64 changes: 6 additions & 58 deletions Source/Charts/Charts/ChartViewBase.swift
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -72,59 +72,7 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate
/// The `Description` object of the chart.
/// This should have been called just "description", but
@objc open var chartDescription: Description?

/// This property is deprecated - Use `chartDescription.text` instead.
@objc @available(*, deprecated: 1.0, message: "Use `chartDescription.text` instead.")
open var descriptionText: String
{
get { return chartDescription?.text ?? "" }
set { chartDescription?.text = newValue }
}

/// This property is deprecated - Use `chartDescription.font` instead.
@objc @available(*, deprecated: 1.0, message: "Use `chartDescription.font` instead.")
open var descriptionFont: NSUIFont?
{
get { return chartDescription?.font }
set
{
if let value = newValue
{
chartDescription?.font = value
}
}
}

/// This property is deprecated - Use `chartDescription.textColor` instead.
@objc @available(*, deprecated: 1.0, message: "Use `chartDescription.textColor` instead.")
open var descriptionTextColor: NSUIColor?
{
get { return chartDescription?.textColor }
set
{
if let value = newValue
{
chartDescription?.textColor = value
}
}
}

/// This property is deprecated - Use `chartDescription.textAlign` instead.
@objc @available(*, deprecated: 1.0, message: "Use `chartDescription.textAlign` instead.")
open var descriptionTextAlign: NSTextAlignment
{
get { return chartDescription?.textAlign ?? NSTextAlignment.right }
set { chartDescription?.textAlign = newValue }
}

/// This property is deprecated - Use `chartDescription.position` instead.
@available(*, deprecated: 1.0, message: "Use `chartDescription.position` instead.")
open var descriptionTextPosition: CGPoint?
{
get { return chartDescription?.position }
set { chartDescription?.position = newValue }
}


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

Expand Down Expand Up @@ -155,7 +103,7 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate

/// flag that indicates if offsets calculation has already been done or not
private var _offsetsCalculated = false
/// array of Highlight objects that reference the highlighted slices in the chart
internal var _indicesToHighlight = [Highlight]()

Expand Down Expand Up @@ -275,8 +223,8 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate
_data = nil
_offsetsCalculated = false
_indicesToHighlight.removeAll()
lastHighlighted = nil
lastHighlighted = nil
setNeedsDisplay()
}

Expand Down Expand Up @@ -862,7 +810,7 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate
/// - returns: `true` if the image was saved successfully
open func save(to path: String, format: ImageFormat, compressionQuality: Double) -> Bool
{
guard let image = getChartImage(transparent: format != .jpeg) else { return false }
guard let image = getChartImage(transparent: format != .jpeg) else { return false }

let imageData: Data?
switch (format)
Expand All @@ -882,7 +830,7 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate
return false
}

return true
return true
}

internal var _viewportJobs = [ViewPortJob]()
Expand Down
26 changes: 1 addition & 25 deletions Source/Charts/Charts/PieChartView.swift
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -532,31 +532,7 @@ open class PieChartView: PieRadarChartViewBase
setNeedsDisplay()
}
}

/// set this to true to draw the enrty labels into the pie slices
@objc @available(*, deprecated: 1.0, message: "Use `drawEntryLabelsEnabled` instead.")
open var drawSliceTextEnabled: Bool
{
get
{
return drawEntryLabelsEnabled
}
set
{
drawEntryLabelsEnabled = newValue
}
}

/// - returns: `true` if drawing entry labels is enabled, `false` ifnot
@objc @available(*, deprecated: 1.0, message: "Use `isDrawEntryLabelsEnabled` instead.")
open var isDrawSliceTextEnabled: Bool
{
get
{
return isDrawEntryLabelsEnabled
}
}


/// The color the entry labels are drawn with.
@objc open var entryLabelColor: NSUIColor?
{
Expand Down
18 changes: 1 addition & 17 deletions Source/Charts/Components/AxisBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -298,23 +298,7 @@ open class AxisBase: ComponentBase
}

@objc open var isAxisMaxCustom: Bool { return _customAxisMax }

/// This property is deprecated - Use `axisMinimum` instead.
@objc @available(*, deprecated: 1.0, message: "Use axisMinimum instead.")
open var axisMinValue: Double
{
get { return axisMinimum }
set { axisMinimum = newValue }
}

/// This property is deprecated - Use `axisMaximum` instead.
@objc @available(*, deprecated: 1.0, message: "Use axisMaximum instead.")
open var axisMaxValue: Double
{
get { return axisMaximum }
set { axisMaximum = newValue }
}


/// The minimum value for this axis.
/// If set, this value will not be calculated automatically depending on the provided data.
/// Use `resetCustomAxisMin()` to undo this.
Expand Down
Loading

0 comments on commit ecdd295

Please # to comment.