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

Swift 4.2 #1

Open
wants to merge 2 commits into
base: Swift-4.2
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions Source/Charts/Charts/BarLineChartViewBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -877,8 +877,8 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD
let velocity = _panGestureRecognizer.velocity(in: self)
if _data === nil || !isDragEnabled ||
(self.hasNoDragOffset && self.isFullyZoomedOut && !self.isHighlightPerDragEnabled) ||
(!_dragYEnabled && fabs(velocity.y) > fabs(velocity.x)) ||
(!_dragXEnabled && fabs(velocity.y) < fabs(velocity.x))
(!_dragYEnabled && abs(velocity.y) > abs(velocity.x)) ||
(!_dragXEnabled && abs(velocity.y) < abs(velocity.x))
{
return false
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Charts/Filters/DataApproximator+N.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extension CGPoint {
let dx = linePoint2.x - linePoint1.x
let dy = linePoint2.y - linePoint1.y

let dividend = fabs(dy * self.x - dx * self.y - linePoint1.x * linePoint2.y + linePoint2.x * linePoint1.y)
let dividend = abs(dy * self.x - dx * self.y - linePoint1.x * linePoint2.y + linePoint2.x * linePoint1.y)
let divisor = sqrt(dx * dx + dy * dy)

return dividend / divisor
Expand Down
2 changes: 1 addition & 1 deletion Source/Charts/Renderers/ChartDataRendererBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import CoreGraphics
@objc(ChartDataRendererBase)
open class DataRenderer: Renderer
{
@objc open let animator: Animator
@objc public let animator: Animator

@objc public init(animator: Animator, viewPortHandler: ViewPortHandler)
{
Expand Down
2 changes: 1 addition & 1 deletion Source/Charts/Renderers/Renderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import CoreGraphics
open class Renderer: NSObject
{
/// the component that handles the drawing area of the chart and it's offsets
@objc open let viewPortHandler: ViewPortHandler
@objc public let viewPortHandler: ViewPortHandler

@objc public init(viewPortHandler: ViewPortHandler)
{
Expand Down