Setting functions to display graphs in js
First complete version of statistics display