org.moxieapps.gwt.highcharts.client
Class Animation
java.lang.Object
org.moxieapps.gwt.highcharts.client.Configurable<Animation>
org.moxieapps.gwt.highcharts.client.Animation
public class Animation
- extends Configurable<Animation>
A configurable class that can be used to represent custom animation options, which
can then be set as the default animation approach for the entire chart via the
BaseChart.setAnimation(Animation)
method, or just set for certain operations (such as
when adding a new point to a series in Series.addPoint(Number, boolean, boolean, Animation)
.
Example usage:
chart.setAnimation(
new Animation()
.setDuration(100)
.setEasing(Animation.Easing.LINEAR)
);
- Since:
- 1.0.0
- Author:
- squinn@moxiegroup.com (Shawn Quinn)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Animation
public Animation()
setDuration
public Animation setDuration(Number duration)
- Convenience method for setting the 'duration' option of the animation. Equivalent to:
animation.setOption("duration", 500);
- Parameters:
duration
- The duration of the animation in milliseconds.
- Returns:
- A reference to this
Animation
instance for convenient method chaining.
setEasing
public Animation setEasing(Animation.Easing easing)
- Convenience method for setting the 'easing' option of the animation. Equivalent to:
animation.setOption("easing", "linear");
Note that more easing functions are available using
jQuery plugins, in which case
you'll want to use the setEasing(String)
method instead.
- Parameters:
easing
- The type of easing transition that you would like animations to use (the default is Animation.Easing.SWING
);
- Returns:
- A reference to this
Animation
instance for convenient method chaining.
setEasing
public Animation setEasing(String easing)
- Convenience method for setting the 'easing' option of the animation. Equivalent to:
animation.setOption("easing", "linear");
Note that this method is primarily intended to be used when you're using a
jQuery plugin to support additional
easing types. If you're just using standard jQuery easing types you'll want to use the
setEasing(Animation.Easing)
method instead.
- Parameters:
easing
- The type of easing transition that you would like animations to use (the default is "swing");
- Returns:
- A reference to this
Animation
instance for convenient method chaining.
Copyright © 2015. All Rights Reserved.