added legend to pie chart