Add max and min to get the bar length