Calculation of percentages from data in a bar graph