Issues found on testing

1) JavaScript Exception being thrown when adding legend box
2) Popup box does not close on clicking over graph