Implementing the pie chart for ratings