adding necessery code in main js file for pie chart