Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function drawBar(x,y,px,py,value,color){
- context.fillStyle = "#8e8c8c";
- context.fillRect(x,y,x+px,y+py);
- context.fillStyle = color;
- var percent = px*(value)/100.0;
- context.fillRect(x,y,x+percent,y+py);
- }
- drawBar(10,10,50,10,50,"#FF0");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement