added percentages and legend to the pie chart