Calculating the width of review bars

16 Views Asked by At

I am not that great at math, but I am trying to figure out what the width of these progress bars should be, based on how many reviews I have. Image

If I have three reviews, two of the reviews are 5 stars, the third review is a 2 star, how would I calculate the percentage for each bar?

1

There are 1 best solutions below

0
On BEST ANSWER

I think that the total length of the review bars should be the width of the rectangle showing them. So in your hypothetical example the five star bar would be $2/3$ of the width and the two star bar would be $1/3$.

If all the reviews happen to agree, that one bar is the full width of the rectangle.