render the graph properly