update pie chart and legends