added stacked bar chart functionality