Javascript Coin Stack

Here is my very simple, resizable, html5 Coin Stack Gauge. It is very easy to customize so you can change it up any way you like by modifying the code.

I am releasing this under the MIT license because I find it to be the most useful for free and non-free software. As a commercial Developer I need to be able to use open source in closed projects. The License is at the top of each of the javascript files.

To use this control you simply need to include a canvas object on your page and the following script at the bottom of your web page.
<canvas id='myCoins' width='100px' height='200px' ></canvas>

Put this line at the bottom of the file to include the code.
<script type="text/javascript" src="ROCoinStack.js"></script>

The following code shows how to call the script to draw the gauge. You can also look at the javascript on this page to see how it is done.

<script type="text/javascript">
var nCoins = Math.floor(Math.random()* 20);
var nMaxCoins = 20;
try
{
drawCoinStack('myCoins',nCoins,nMaxCoins);
} catch(err)
{
}
</script>

Here is a link to the code ROCoinStack.js or you can pull the latest from github at https://github.com/rostafichuk/JS_Gauges.git