Speedometer with animation

Speedometer with animation

By Torstein Hønsi

The speedometer gauge is popular chart type for dashboards, as it is well suited to display performance.

In this example you’ll learn how to generate this chart, and subsequently, animate the needle (indicator).

The animation is achieved by creating and updating the value of the indicator. The value is calculated using Math.round(), then feature point.update() updates the indicator’s value.

You can learn more about point.update here.

Do you like this example? Rate it!

Do you have some code you want to share with the world as well? Go here to learn how you may contribute some helpful code of your own.