Decomposed out the displaygraph.js