This can be really confusing. Just reading this part, I am expecting a global variable named graphPanel attached to the browser window object