Type class
Animation can be used to transition certain properties on an object that implements IAnimatable
interface.
IAnimationEvents
for a list of available events
Sources
Animation can be used (imported) via one of the following packages.
// Animation is available in all of the following modules. // You only need to import one of them. /** * -------------------------------------------------------- * Import from: "core.ts" * Use like: am4core.Animation * -------------------------------------------------------- */ import * as am4core from "@amcharts/amcharts4/core";
// Animation is available in all of the following modules. // You only need to import one of them. /** * -------------------------------------------------------- * Include via: <script src="core.js"></script> * Access items like: am4.Animation * -------------------------------------------------------- */
Inheritance
Animation extends BaseObjectEvents
.
Animation is not extended by any other symbol.
Properties
animationOptions # |
Type An array of animation option objects. Each animation object represent one property. Animation can animate any number of properties simultaneously. |
---|---|
clonedFrom # |
Type Inherited from Reference to the original object this object was cloned from. We need to keep this so we can disassociate it from source object when this object is disposed. |
config # |
Type Inherited from Use this property to set JSON-based config. When set, triggers processing routine, which will go through all properties, and try to apply values, create instances, etc. Use this with caution, as it is a time-consuming process. It's used for initialchart setup only, not routine operations. |
delayed # |
Type Returns @readonly |
duration # |
Type Default Duration of the animation in milliseconds. |
easing # |
Type ( value: Default Easing function to use.
|
events # |
Type Inherited from An |
id # |
Type Inherited from Sets the user-defined id of the element. |
object # |
Type An animation target object. |
progress # |
Type Default Contains progress of the current animation: 0 (start) to 1 (end). |
uid # |
Type Inherited from Returns object's internal unique ID. |
There are 5 inherited items currently hidden from this list. |
Methods
clone( cloneId?: ) |
Returns Inherited from Makes a copy of this object and returns the clone. Try to avoid cloning complex objects like chart, create new instances if you need them. |
---|---|
constructor( object: ) |
Returns Constructor |
copyFrom( source: ) |
Returns Inherited from Copies all parameters from another |
delay( delay: ) |
Returns Delays animation start by X milliseconds. |
dispatch( eventType: ) |
Returns Inherited from Dispatches an event using own event dispatcher. Will automatically populate event data object with event type and target (this element). It also checks if there are any handlers registered for this sepecific event. |
dispatchImmediately( eventType: ) |
Returns Inherited from Works like |
dispose() |
Returns Disposes this object, clears up after itself. |
end() |
Returns Jumps to animation end. If animation is set to loop, this will start another round of animation from start. |
getCurrentThemes() |
Returns Inherited from Returns a list of themes that should be applied to this element. It could either be a list of themes set explicitly on this element, or system-wide. |
isDisposed() |
Returns Inherited from Returns if this object has been already been disposed. |
isFinished() |
Returns Returns indicator if this animation is finished or not |
kill() |
Returns Stops animation immediately leaving properties in their current values. |
loop( count?: ) |
Returns Sets loop count for the animation. If parameter is not a valid number the animation will keep on looping indefinitely. |
pause() |
Returns Pauses animation. |
resume() |
Returns Resumes paused animation. |
setProgress( progress: ) |
Returns Sets current progress and updates object's numeric and color values. |
start() |
Returns Starts animation. |
stop( skipEvent?: ) |
Returns Stops animation. When animation is stopped, the properties of the target object will remain where they were at the moment when |
There are 6 inherited items currently hidden from this list. |
Events
#animationended |
Param { progress: Invoked when animation finishes playing. |
---|---|
#animationprogress |
Param { progress: Invoked when animation makes progress. |
#animationstarted |
Param { progress: Invoked when animation starts playing. |
#animationstopped |
Param { progress: Invoked when animation is stopped by some other process, before it had a chance to finish. |
Adapters
Animation does not have any adapters.