js is effin hard - graphing in JS