Working code (separately) for grouped bar chart on metrics