Adds pie chart functionality