refactored javascript for pie charts
Merge pull request #30 from fiddler-crabs-2014/feature/pie-chart

refactored javascript for pie charts