Draw graphs in JavaScript/HTML