set DOM event
Rendering graph
Improved graph but still needs debugging
Clear function to clear the loop