fixing the calculation of X axis percentages