Skip to content

Commit

Permalink
Merge pull request #3612 from AntonTheDev/master
Browse files Browse the repository at this point in the history
Feature - ChartView Pan Ended Delegate Call
  • Loading branch information
liuxuan30 committed Jan 22, 2019
2 parents bd3d1eb + 33e8eb1 commit f2795b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/Charts/Charts/BarLineChartViewBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,8 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD
_outerScrollView?.nsuiIsScrollEnabled = true
_outerScrollView = nil
}

delegate?.chartViewDidEndPanning?(self)
}
}

Expand Down
3 changes: 3 additions & 0 deletions Source/Charts/Charts/ChartViewBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public protocol ChartViewDelegate
/// - highlight: The corresponding highlight object that contains information about the highlighted position such as dataSetIndex etc.
@objc optional func chartValueSelected(_ chartView: ChartViewBase, entry: ChartDataEntry, highlight: Highlight)

/// Called when a user stops panning between values on the chart
@objc optional func chartViewDidEndPanning(_ chartView: ChartViewBase)

// Called when nothing has been selected or an "un-select" has been made.
@objc optional func chartValueNothingSelected(_ chartView: ChartViewBase)

Expand Down

0 comments on commit f2795b9

Please sign in to comment.