added piechart legend and some testing for animation