Fix18/graph

first graph is now being displayed again + some refactoring on the relevant function and the renderer.