added demo file for the pie chart. Fixed bugs in the pie chart