JavaScript/HTML5 Canvas Random Graph Generator