Adjust the size of the graph according to device screen