public class

SeriesAnimation

extends Object
java.lang.Object
   ↳ com.shinobicontrols.charts.SeriesAnimation

Class Overview

A SeriesAnimation object determines how a Series is animated.

A series animation consists of curves for X scale, Y scale and alpha, a duration, and origin values for X and Y scaling (the zero values that the animations scale down to).

Depending on the action which an animation is linked to, it may be triggered by different actions:

Entry Animations are triggered upon the initial addition of the series to the chart and when a series is unhidden. Exit Animations are triggered when a series is hidden or removed from the chart.

Summary

Public Constructors
SeriesAnimation()
Constructor The default animation does nothing, and you are recommended to us one of the predefined create methods.
Public Methods
static SeriesAnimation createFadeAnimation()
Creates an animation where the series fades.
static SeriesAnimation createGrowAnimation()
Creates an animation where the series scales from its center (the normalized X and Y are both set to 0.5f).
static SeriesAnimation createGrowHorizontalAnimation()
Creates an animation where the series scales from its leftmost point.
static SeriesAnimation createGrowVerticalAnimation()
Creates an animation where the series scales from its lowest point.
static SeriesAnimation createTelevisionAnimation()
Creates an animation where the series scales from its center (the normalized X and Y are both set to 0.5f).
AnimationCurve getAlphaCurve()
Gets the animation curve describing how the transparency of the series changes during the animation.
float getDuration()
Gets the duration, in seconds.
Float getXOrigin()
Returns a normalized point of origin along the X axis for the animation.
AnimationCurve getXScaleCurve()
Gets the animation curve describing the transition of the series parallel to the X axis.
Float getYOrigin()
Returns a normalized point of origin along the Y axis for the animation.
AnimationCurve getYScaleCurve()
Gets the animation curve describing the transition of the series parallel to the Y axis.
void setAlphaCurve(AnimationCurve curve)
Sets the animation curve describing how the transparency of the series changes during the animation.
void setDuration(float duration)
Sets the duration, in seconds.
void setXOrigin(Float origin)
Sets a normalized point of origin along the X axis for the animation.
void setXScaleCurve(AnimationCurve curve)
Sets the animation curve describing the transition of the series parallel to the X axis.
void setYOrigin(Float origin)
Sets a normalized point of origin along the Y axis for the animation.
void setYScaleCurve(AnimationCurve curve)
Sets the animation curve describing the transition of the series parallel to the Y axis.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public SeriesAnimation ()

Constructor The default animation does nothing, and you are recommended to us one of the predefined create methods. However, it may be useful if you are creating your own specialized animation type.

Public Methods

public static SeriesAnimation createFadeAnimation ()

Creates an animation where the series fades.

Returns
  • An animation where the series fades.

public static SeriesAnimation createGrowAnimation ()

Creates an animation where the series scales from its center (the normalized X and Y are both set to 0.5f). This is the default entry & exit animation for Donut series, and Pie series.

Returns
  • An animation where the series scales from its center

public static SeriesAnimation createGrowHorizontalAnimation ()

Creates an animation where the series scales from its leftmost point. This is the default entry & exit animation for Bar series. If a baseline is set on a bar series, the baseline will be used as the origin.

Returns
  • An animation where the series scales from its leftmost point.

public static SeriesAnimation createGrowVerticalAnimation ()

Creates an animation where the series scales from its lowest point. This is the default entry & exit animation for Column series, OHLC series and Candlestick series. If a baseline is set on a column series the baseline will be used as the origin instead.

Returns
  • An animation where the series scales from its lowest point.

public static SeriesAnimation createTelevisionAnimation ()

Creates an animation where the series scales from its center (the normalized X and Y are both set to 0.5f). This is similar to the Grow animation, but includes a delay element. This is the default entry & exit animation for Line series, and Band series.

Returns
  • An animation where the series scales from its center

public AnimationCurve getAlphaCurve ()

Gets the animation curve describing how the transparency of the series changes during the animation. This curve describes how the alpha value of the colors of the series scale from some initial alpha value at the start of the animation to some destination alpha at the end of the animation. We multiply the value returned by this curve with the colors set to the series, therefore a curve value of 0 results in a completely transparent color and a value of 1 results in the final alpha value of the series color. This curve applies to both cartesian and radial series.

Returns
  • The animation curve describing how the transparency of the series changes during the animation.

public float getDuration ()

Gets the duration, in seconds.

Returns
  • The duration, in seconds

public Float getXOrigin ()

Returns a normalized point of origin along the X axis for the animation.

This value is normalized using the currently visible range of the X axis associated with the series which the animation is applied to. For example, setting an origin of 0.0f would cause the series to animate from its left-most point. Setting an origin of 1.0f would cause the series to animate from its right-most point.

The origin value may also be null. In this case (useful for Bar series) the series baseline is used as the origin.

Returns
  • A normalized point of origin along the X axis for the animation.

public AnimationCurve getXScaleCurve ()

Gets the animation curve describing the transition of the series parallel to the X axis. This curve describes how the X values of the series scale from some origin along the X axis at the start of the animation to their destination at the end of the animation. A value of 0 maps a point at the animation origin whereas a value of 1 maps the point at its true value.

Returns
  • The animation curve describing the transition of the series parallel to the X axis.

public Float getYOrigin ()

Returns a normalized point of origin along the Y axis for the animation.

This value is normalized using the currently visible range of the Y axis associated with the series which the animation is applied to. For example, setting an origin of 0.0f would cause the series to animate from its bottom-most point. Setting an origin of 1.0f would cause the series to animate from its top-most point.

The origin value may also be null. In this case (useful for Column series) the series baseline is used as the origin.

Returns
  • A normalized point of origin along the Y axis for the animation.

public AnimationCurve getYScaleCurve ()

Gets the animation curve describing the transition of the series parallel to the Y axis. This curve describes how the Y values of the series scale from some origin along the Y axis at the start of the animation to their destination at the end of the animation. A value of 0 maps a point at the animation origin whereas a value of 1 maps the point at its true value.

Returns
  • The animation curve describing the transition of the series parallel to the Y axis.

public void setAlphaCurve (AnimationCurve curve)

Sets the animation curve describing how the transparency of the series changes during the animation. This curve describes how the alpha value of the colors of the series scale from some initial alpha value at the start of the animation to some destination alpha at the end of the animation. We multiply the value returned by this curve with the colors set to the series, therefore a curve value of 0 results in a completely transparent color and a value of 1 results in the final alpha value of the series color. This curve applies to both cartesian and radial series.

Parameters
curve The animation curve describing how the transparency of the series changes during the animation.
See Also

public void setDuration (float duration)

Sets the duration, in seconds.

Parameters
duration The duration, in seconds
See Also

public void setXOrigin (Float origin)

Sets a normalized point of origin along the X axis for the animation.

This value is normalized using the currently visible range of the X axis associated with the series which the animation is applied to. For example, setting an origin of 0.0f would cause the series to animate from its left-most point. Setting an origin of 1.0f would cause the series to animate from its right-most point.

The origin value may also be null. In this case (useful for Bar series) the series baseline is used as the origin.

Parameters
origin A normalized point of origin along the Y axis for the animation.
See Also

public void setXScaleCurve (AnimationCurve curve)

Sets the animation curve describing the transition of the series parallel to the X axis. This curve describes how the X values of the series scale from some origin along the X axis at the start of the animation to their destination at the end of the animation. A value of 0 maps a point at the animation origin whereas a value of 1 maps the point at its true value.

Parameters
curve The animation curve describing the transition of the series parallel to the X axis.
See Also

public void setYOrigin (Float origin)

Sets a normalized point of origin along the Y axis for the animation.

This value is normalized using the currently visible range of the Y axis associated with the series which the animation is applied to. For example, setting an origin of 0.0f would cause the series to animate from its bottom-most point. Setting an origin of 1.0f would cause the series to animate from its top-most point.

The origin value may also be null. In this case (useful for Column series) the series baseline is used as the origin.

Parameters
origin A normalized point of origin along the Y axis for the animation.
See Also

public void setYScaleCurve (AnimationCurve curve)

Sets the animation curve describing the transition of the series parallel to the Y axis. This curve describes how the Y values of the series scale from some origin along the Y axis at the start of the animation to their destination at the end of the animation. A value of 0 maps a point at the animation origin whereas a value of 1 maps the point at its true value.

Parameters
curve The animation curve describing the transition of the series parallel to the Y axis.
See Also