Refactoring stacked bar chart and new data implementation