refactor PieChart