diff --git a/Source/Charts/Charts/ChartViewBase.swift b/Source/Charts/Charts/ChartViewBase.swift index 03350fcbcd..6ed79e31c1 100644 --- a/Source/Charts/Charts/ChartViewBase.swift +++ b/Source/Charts/Charts/ChartViewBase.swift @@ -38,6 +38,9 @@ public protocol ChartViewDelegate // Callbacks when the chart is moved / translated via drag gesture. @objc optional func chartTranslated(_ chartView: ChartViewBase, dX: CGFloat, dY: CGFloat) + + // Callbacks when Animator stops animating + @objc optional func chartView(_ chartView: ChartViewBase, animatorDidStop animator: Animator) } open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate @@ -996,7 +999,7 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate open func animatorStopped(_ chartAnimator: Animator) { - + delegate?.chartView?(self, animatorDidStop: chartAnimator) } // MARK: - Touches