Please, refer to a source code of this page to get a clue how it works.
Real usage example
- internet speed test measure (Opera, Chrome, Firefox, Safari only)
Single custom gauge example
Custom gauge with negative values
on GitHub. Licensed under MIT. Feel free to use it whatever you want.