public class Animation extends Configurable<Animation>
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)
);
| Modifier and Type | Class and Description |
|---|---|
static class |
Animation.Easing
An enumeration of supported animation easing types, which can be passed to methods such as
setEasing(Animation.Easing). |
| Constructor and Description |
|---|
Animation() |
| Modifier and Type | Method and Description |
|---|---|
Animation |
setDuration(Number duration)
Convenience method for setting the 'duration' option of the animation.
|
Animation |
setEasing(Animation.Easing easing)
Convenience method for setting the 'easing' option of the animation.
|
Animation |
setEasing(String easing)
Convenience method for setting the 'easing' option of the animation.
|
getOptions, setOptionpublic Animation setDuration(Number duration)
animation.setOption("duration", 500);
duration - The duration of the animation in milliseconds.Animation instance for convenient method chaining.public Animation setEasing(Animation.Easing easing)
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.easing - The type of easing transition that you would like animations to use (the default is Animation.Easing.SWING);Animation instance for convenient method chaining.public Animation setEasing(String easing)
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.easing - The type of easing transition that you would like animations to use (the default is "swing");Animation instance for convenient method chaining.Copyright © 2015. All Rights Reserved.