Changed the way the graph changes colour