animate(step: Number);
step. Animation step.
The animate method returns arrow parameters to a specified animation step.
To execute the example, the page must contain the Speedometer component named speedometer (see Example of Creating a Speedometer with a Wizard).
Get scale arrow by its name and change its parameters. Redraw speedometes scales. Next set a value for the next animation step for this arrow, and move to the step. Redraw the speedometer:
// Get speedometer scale var scale = speedometer.getScales()[3]; // Get scale arrow by its name var arrow = scale.getArrowByName("Arrow1")[0]; // Disable opacity arrow.setOpacityEnabled(False); // Set arrow length arrow.setRadius(0.8); // Set arrow value arrow.setValue(0); // Redraw speedometer scales speedometer.redrawScales(); // Set value of the succeeding animation step arrow.setAnimationValues(300); // Move to the specified animation step arrow.animate(1); // Redraw the speedometer speedometer.redraw();
After executing the example the arrow is moved to animation step with specified parameters:
See also: