SChartAnimationCurve

@protocol SChartAnimationCurve <NSObject, NSCopying>

The SChartAnimationCurve protocol allows any object to act as a curve evaluator for series’ animations, as defined in SChartAnimation.

Given a time point between the start and end of an animation, a curve evaluator returns a value which represents the progress of the series between its beginning and end positions. For more information on curve evaluation, see the valueAtProgress: method defined in the protocol.

Objects conforming to this protocol need also to conform to the NSCopying protocol.

We have defined concrete implementations of this protocol to support common animation use cases which you might have. The concrete animation curve classes are:

  • Should return an appropriate value for the animation curve at the given progress.

    The value returned represents the progress of the series between its beginning and end positions, where 0.f is the start state and 1.f is, nominally, the end state. It is valid to return a value ‘v’ where either v < 0.f or v > 1.f.

    Declaration

    Objective-C

    - (double)valueAtProgress:(double)progress;

    Swift

    func value(atProgress progress: Double) -> Double

    Parameters

    progress

    A double between 0.f and 1.f, where 0.f is the beginning of the animation and 1.f is the end of the animation.