fix pie chart instantiation