Updated for Bar & Pie chart