Adjust max and min height of the bar