diff --git a/Source/Charts/Charts/ChartViewBase.swift b/Source/Charts/Charts/ChartViewBase.swift index 00f214b3ff..e365f6c47a 100644 --- a/Source/Charts/Charts/ChartViewBase.swift +++ b/Source/Charts/Charts/ChartViewBase.swift @@ -34,6 +34,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 @@ -992,7 +995,7 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate open func animatorStopped(_ chartAnimator: Animator) { - + delegate?.chartView?(self, animatorDidStop: chartAnimator) } // MARK: - Touches