Make nested pie chart reusable