Skip to content

Instantly share code, notes, and snippets.

@bitpshr
Last active December 14, 2015 19:19
Show Gist options
  • Save bitpshr/5135938 to your computer and use it in GitHub Desktop.
Save bitpshr/5135938 to your computer and use it in GitHub Desktop.
var scale = parseFloat(height - 1) / max;
var render = function (v, i){
v *= scale;
c.fillRect(i * width, height - v, width - 1, v);
};
var i, len;
for(i=0, len=data.owner.length; i<len; i++){
render(data.owner[i], i);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment