Refactor graph generation

The graph now looks as seen in the screenshot below and updates when update button is clicked:
![screenshot 2013-12-21 18 17 18](https://f.cloud.github.com/assets/476364/1796300/90451f7a-6a64-11e3-884d-ef4ae45e4de7.png)