Added functionality to set the max value of a graph