I have been trying to add a legend to this pie chart that I have created. I tried using code from getting a legend using a bar chart but I do not think it works or translate