Added dynamic Y axis adjustment to the graph